ClusterLabs / ClusterLabs/resource-agents
DB2 HADR Resource Agent
- Dominant language
- Shell
- Stars
- 519
- Forks
- 608
- Avg merge
- 6d 1h
- Merged PRs (30d)
- 7
Description
I am facing multiple issues with the DB2 Resource Agent.
The first issue was that when I start Pacemaker, DB2 is also started and immediately after that DB2 gets stopped. I fixed that by removing \ before $ in Line numbers 686, 689 and 691.
684 CMD="if db2 connect to $db;
685 then
686 db2 select \* from sysibm.sysversions ; rc=\$?;
687 db2 terminate;
688 else
689 rc=\$?;
690 fi;
691 exit \$rc"
Now the second issue I am facing is that when I crash the node were DB is primary, the STANDBY DB is not getting promoted to PRIMARY. I could fix that by adding below lines in db2_promote()
773 *)
774 # must take over forced
775 force="by force"
776
777 ;;
But I am not sure of the implications that this can cause.
Can someone suggest whether what I am doing is correct OR will this lead to any Data loss.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the DB2 resource-agent script around lines 684-691 and the db2_promote() branch around lines 773-777. Reproduce the startup and primary-node failure scenarios, then determine the intended escaping and promotion behavior, including whether the proposed changes can cause data loss; done means the behavior and safety implications are documented and verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- shell, sql
- Domain
- databases, infrastructure
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100