cancel
Showing results for 
Search instead for 
Did you mean: 

Problem with ServiceGroup dependency

ACID1943
Level 3

Hi

 

we have a veritas cluster server here, (totally new for me) . So the VCS manage a tamino application, this tamino application has two database instances f.e. db1 and db2

So i configured for each instance a service group, Tamino and TaminoDB2. Cause the problem is, when database db1 goes down the VCS shutdown also the db2 and that is not what i want. I want to seperate this. Hope you understand me. Here are my main.cf entries for tamino

 

group Tamino (
    SystemList = { np-p62 = 0, np-p61 = 1 }
    AutoStart = 0
    AutoStartList = { np-p62 }
    AutoRestart = 0
    )

    Application TaminoApache (
        Critical = 0
        StartProgram = "/opt/VRTSvcs/bin/TaminoApache/online"
        StopProgram = "/opt/VRTSvcs/bin/TaminoApache/offline"
        MonitorProgram = "/opt/VRTSvcs/bin/TaminoApache/monitor"
        )

    Application sag2adi (
        StartProgram = "/opt/VRTSvcs/bin/sag2adi/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2adi/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2adi/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2adi/monitor"
        )

    Application sag2arg (
        StartProgram = "/opt/VRTSvcs/bin/sag2arg/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2arg/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2arg/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2arg/monitor"
        )

    Application sag2argev (
        StartProgram = "/opt/VRTSvcs/bin/sag2argev/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2argev/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2argev/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2argev/monitor"
        )

    Application sag2argml (
        StartProgram = "/opt/VRTSvcs/bin/sag2argml/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2argml/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2argml/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2argml/monitor"
        )

    Application sag2utx (
        StartProgram = "/opt/VRTSvcs/bin/sag2utx/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2utx/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2utx/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2utx/monitor"
        )

    IP NP-DB6 (
        Device = eth0
        Address = "192.168.0.41"
        NetMask = "255.255.255.0"
        )

    LVMLogicalVolume LVM-Vol-Backup (
        Critical = 0
        LogicalVolume = backupvol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Data (
        Critical = 0
        LogicalVolume = datavol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Index (
        Critical = 0
        LogicalVolume = indexvol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Log (
        Critical = 0
        LogicalVolume = logvol
        VolumeGroup = volgtlog
        )

    LVMLogicalVolume LVM-Vol-Misc (
        Critical = 0
        LogicalVolume = miscvol
        VolumeGroup = volgtlog
        )

    Mount BackupMount (
        Critical = 0
        MountPoint = "/opt/tamino/ino/db/backup"
        BlockDevice = "/dev/mapper/volgtdata-backupvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount DataMount (
        MountPoint = "/opt/tamino/ino/db/data"
        BlockDevice = "/dev/mapper/volgtdata-datavol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount IndexMount (
        MountPoint = "/opt/tamino/ino/db/index"
        BlockDevice = "/dev/mapper/volgtdata-indexvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount LogMount (
        MountPoint = "/opt/tamino/ino/db/log"
        BlockDevice = "/dev/mapper/volgtlog-logvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount MiscMount (
        MountPoint = "/opt/tamino/ino/db/misc"
        BlockDevice = "/dev/mapper/volgtlog-miscvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    TaminoSrv DB1 (
        Critical = 0
        ServerName = DB1
        HaCollection = inoham
        TaminoUsername = tamino
        TaminoPassword = tamino
        SagInstallationUser = tamino
        Host = tamino
        Timeout = 300
        )

    requires group LVM-Paralel-Groups online local soft
    BackupMount requires LVM-Vol-Backup
    DataMount requires LVM-Vol-Data
    IndexMount requires LVM-Vol-Index
    LVM-Vol-Backup requires NP-DB6
    LVM-Vol-Data requires NP-DB6
    LVM-Vol-Index requires NP-DB6
    LVM-Vol-Log requires NP-DB6
    LVM-Vol-Misc requires NP-DB6
    LogMount requires LVM-Vol-Log
    MiscMount requires LVM-Vol-Misc
    DB1 requires sag2utx
    TaminoApache requires sag2utx
    sag2adi requires BackupMount
    sag2adi requires DataMount
    sag2adi requires IndexMount
    sag2adi requires LogMount
    sag2adi requires MiscMount
    sag2arg requires sag2adi
    sag2argev requires sag2arg
    sag2argml requires sag2argev
    sag2utx requires sag2argml


group TaminoNews (
    SystemList = { np-p62 = 0, np-p61 = 1 }
    )

    Application TaminoApache_1 (
        StartProgram = "/opt/VRTSvcs/bin/TaminoApache/online"
        StopProgram = "/opt/VRTSvcs/bin/TaminoApache/offline"
        MonitorProgram = "/opt/VRTSvcs/bin/TaminoApache/monitor"
        )

    Application sag2adi_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2adi/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2adi/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2adi/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2adi/monitor"
        )

    Application sag2arg_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2arg/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2arg/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2arg/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2arg/monitor"
        )

    Application sag2argev_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2argev/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2argev/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2argev/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2argev/monitor"
        )

    Application sag2argml_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2argml/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2argml/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2argml/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2argml/monitor"
        )

Regards

ACID1943
    Application sag2utx_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2utx/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2utx/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2utx/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2utx/monitor"
        )

    IP NP-DB6_1 (
        Device = eth0
        Address = "192.168.0.41"
        NetMask = "255.255.255.0"
        )

    LVMLogicalVolume LVM-Vol-Backup_1 (
        LogicalVolume = backupvol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Data_1 (
        LogicalVolume = datavol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Index_1 (
        LogicalVolume = indexvol
        VolumeGroup = volgtdata
        )

    LVMLogicalVolume LVM-Vol-Log_1 (
        LogicalVolume = logvol
        VolumeGroup = volgtlog
        )

    LVMLogicalVolume LVM-Vol-Misc_1 (
        LogicalVolume = miscvol
        VolumeGroup = volgtlog
        )

    Mount BackupMount_1 (
        MountPoint = "/opt/tamino/ino/db/backup"
        BlockDevice = "/dev/mapper/volgtdata-backupvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount DataMount_1 (
        MountPoint = "/opt/tamino/ino/db/data"
        BlockDevice = "/dev/mapper/volgtdata-datavol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount IndexMount_1 (
        MountPoint = "/opt/tamino/ino/db/index"
        BlockDevice = "/dev/mapper/volgtdata-indexvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount LogMount_1 (
        MountPoint = "/opt/tamino/ino/db/log"
        BlockDevice = "/dev/mapper/volgtlog-logvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    Mount MiscMount_1 (
        MountPoint = "/opt/tamino/ino/db/misc"
        BlockDevice = "/dev/mapper/volgtlog-miscvol"
        FSType = ext3
        FsckOpt = "-y"
        )

    TaminoSrv DB2 (
        Critical = 0
        ServerName = DB2
        HaCollection = inoham
        TaminoUsername = tamino
        TaminoPassword = tamino
        SagInstallationUser = tamino
        Host = tamino
        Timeout = 600
        )

    BackupMount_1 requires LVM-Vol-Backup_1
    DataMount_1 requires LVM-Vol-Data_1
    IndexMount_1 requires LVM-Vol-Index_1
    LVM-Vol-Backup_1 requires NP-DB6_1
    LVM-Vol-Data_1 requires NP-DB6_1
    LVM-Vol-Index_1 requires NP-DB6_1
    LVM-Vol-Log_1 requires NP-DB6_1
    LVM-Vol-Misc_1 requires NP-DB6_1
    LogMount_1 requires LVM-Vol-Log_1
    MiscMount_1 requires LVM-Vol-Misc_1
    DB2 requires sag2utx_1
    TaminoApache_1 requires sag2utx_1
    sag2adi_1 requires BackupMount_1
    sag2adi_1 requires DataMount_1
    sag2adi_1 requires IndexMount_1
    sag2adi_1 requires LogMount_1
    sag2adi_1 requires MiscMount_1
    sag2arg_1 requires sag2adi_1
    sag2argev_1 requires sag2arg_1
    sag2argml_1 requires sag2argev_1
    sag2utx_1 requires sag2argml_1


    

 

 

 


 

1 ACCEPTED SOLUTION

Accepted Solutions

g_lee
Level 6

If db1 and db2 are supposed to run on the same node (ie: they're not supposed to run on different nodes), then you only need one group.

Add TaminoSrv DB2 resource to the existing Tamino group.

Ensure the TaminoSrv resources are non-critical (Critical = 0) so if they fault they won't trigger failover (in your configuration they were already set as Critical = 0, but just make sure when you re-add the resource).

If both databases rely on sag2utx, ensure you configure this dependency.

So, if configured this way, when the group is brought online, after sag2utx is started db1 and db2 will be started.

If db1 faults, the group will not failover, and unless there is dependency between the databases db2 should still remain up, and vice versa.

View solution in original post

8 REPLIES 8

ACID1943
Level 3

Hi

no one can help me in this issue?

 

Kind regards

ACID1943

g_lee
Level 6

Cause the problem is, when database db1 goes down the VCS shutdown also the db2 and that is not what i want. I want to seperate this.

Do you mean when you offline/failover the Tamino group (TaminoSrv DB1), this takes down the TaminoSrv DB2 in the TaminoNews group as well?

One of the problems may be:

DB1 requires sag2utx

    Application sag2utx (
        StartProgram = "/opt/VRTSvcs/bin/sag2utx/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2utx/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2utx/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2utx/monitor"
        )

DB2 requires sag2utx_1

    Application sag2utx_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2utx/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2utx/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2utx/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2utx/monitor"
        )

So the configuration for sag2utx and sag2utx_1 is the same - how does it know which instance it's monitoring/stopping/starting?

Suspect what's happening is you're running hagrp -offline (or switch) for the Tamino group, this offlines the sag2utx resource. However, this is the same proc/app as the sag2utx_1 resource in the TaminoNews group, as this resource is Critical, it will trigger failover and take the DB2 resource down with it since it's dependent on sag2utx_1

The same seems to apply for the other sag* Application resources as well (ie: duplicated configurations)

If both groups are supposed to use the same resources, rather than having 2 sets of resources controlling the same process, a solution could be to replace the Application resources in one of the groups with Proxy resources, and get the Proxy resources to point the Application resources in the other group for status (see the Bundled Agents guide for details on configuring proxy resources)

ACID1943
Level 3

Hi

 

thx for your reply & explanation but i have still problems to find the right way. I read the guide but i´m still confusing how to configure that proxy resource.

My target is, that VCS handles the two database separate, each db have a process in the linux system. So i thought VCS handle and monitor these processes. So f.e when one process died he restart the dead process / db and not all db´s.

I try to configure what you say, but i can´t bring it online.

 

group NewsProxy (
        SystemList = { ncp-p62 = 0, ncp-p61 = 1 }
        )

        Proxy NewsProxy (
                Enabled = 0
                TargetResName = Tamino
                TargetSysName = DB2
                )
 

Any hints what i´m doing wrong?

Kind regards

ACID1943

 

g_lee
Level 6

ACID1943,

The proxy resource should be for the sag2utx resource (and other sag resources), not the TaminoSrv db1/db2 resources.

The resources (of any type) also need to be enabled (Enabled = 1) for VCS to manage them.

The idea is that if both db1 and db2 depend on the sag2utx resource, but sag2utx only needs to run once/one instance - so you use a proxy resource in the second group that uses the status from the first group

in group TaminoNews, replace this

    Application sag2utx_1 (
        StartProgram = "/opt/VRTSvcs/bin/sag2utx/online"
        StopProgram = "/opt/VRTSvcs/bin/sag2utx/offline"
        CleanProgram = "/opt/VRTSvcs/bin/sag2utx/clean"
        MonitorProgram = "/opt/VRTSvcs/bin/sag2utx/monitor"
        )

with:

Proxy sag2utx_proxy (
       TargetResName = sag2utx
)

(where sag2utx is the name of the resource in the group Tamino)

(TargetSysName is optional attribute - default is to monitor on all systems unless you specify)

And then this would be similar for the other sag* resources in TaminoNews; note this would mean DB2 in TaminoNews would not be able to online if the resources in the Tamino group were not online

Your LVM and Mount resources are also duplicated - the duplication of resources is why it is restarting both sets at once - you have two resources controlling the same thing, so this issue is due to incorrect configuration.

Before going any further, please answer the following questions:

1. Are db1 and db2 supposed to run on the same server or are they supposed to be able to run independently (ie: can db1 run on a different/separate node to db2, or does db2 need db1 up on same node to be able to run)?

2. Are the sag* application resources meant to run on one node at a time only, or can they run on both/all nodes simultaneously

3. Are any of the sag* application resources dependent on storage (ie: do they write to any shared storage/any of the configured mount point resources) - or are the mount points only for the TaminoSrv resources (DB1, DB2)

4. What is the configuration for LVM-Paralel-Groups (above config shows Tamino requires group LVM-Paralel-Groups online local soft) - if you could post your main.cf this might give a better idea.

5. VCS Version and platform (Linux?) would also help

ACID1943
Level 3

Hi

ok this i understand, here the answers of your questions

1. the two databases can run on different nodes but should run under normal circumstances on the same node

2. the should also run normal on one node but they can run on both nodes.

3. the mount points are only for the Taminosrv resources

4. i attached the main.cf below ( but without the default TaminoNews i delete this cause it produce some errors)

5. vcs version is 5.0 and linux is redhat 5.

 

Kind regards

ACID1943

g_lee
Level 6

Are you sure the sag* application resources can run on 2 nodes simultaneously?

Your configuration has an existing parallel group with applications that run on both nodes - if this was also applicable for the sag* resources, why were they not added to that group instead of to a separate failover group?

Also, the sag* resources have been configured to be dependent on Mount resources, which in turn are dependent on an IP resource - this suggests/implies the sag resources need an IP and/or Mount??

If you want to run the second TaminoSrv instance on a different node - you will require separate storage (new, separate volume group) and another IP, as you cannot mount the same storage (or configure the same IP) on two nodes at once.

You also have Application TaminoApache - this doesn't have any configured dependencies on the TaminoSrv resources (just the mount resources), so is it correct to presume it will stay in the Tamino group with the current NCPDB1 database?

Assuming you get a new IP and separate storage, and you confirm the sag* applications don't actually need IP or Mount, and that they can run concurrently (you need to work all of this out before making changes to your configuration), you could make the following changes to allow NCPDB1 and NewsDB to run on separate nodes:

- move the sag resources into the LVM-Paralel-Groups group (if you add it to this group, no longer need to add a proxy resource as there is already a group dependency, so the Tamino group won't online if the parallel group is not running)

- create a new group TaminoNews, dependent on LVM-Paralel-Groups (online local soft)

- add new IP and new storage mounts to TaminoNews group

- move NewsDB to new group, make it dependent on the new IP and new mounts, etc

I strongly suggest looking at the VCS Users Guide and the bundled agents reference guide for guidance on configuring the resource and group dependencies before making any changes.

product guides for VCS 5.0 for Linux

https://sort.symantec.com/documents/doc_details/vcs/5.0/Linux/ProductGuides/

ACID1943
Level 3

Hi Lee

 

sorry for late answer, i was sick and not at work.....no the two databases should run on the same node, but the key target should be that if one database crashes the other one should not be restartet through the VCS. I think that the proxy resources would be the best for it?
Sorry for my bad english, hope you can understand what i mean

 

Kind regards

ACID1943

g_lee
Level 6

If db1 and db2 are supposed to run on the same node (ie: they're not supposed to run on different nodes), then you only need one group.

Add TaminoSrv DB2 resource to the existing Tamino group.

Ensure the TaminoSrv resources are non-critical (Critical = 0) so if they fault they won't trigger failover (in your configuration they were already set as Critical = 0, but just make sure when you re-add the resource).

If both databases rely on sag2utx, ensure you configure this dependency.

So, if configured this way, when the group is brought online, after sag2utx is started db1 and db2 will be started.

If db1 faults, the group will not failover, and unless there is dependency between the databases db2 should still remain up, and vice versa.