Skip to content

CLOUDSTACK-8616: Redundant VPC with both routers as Master - #587

Closed
wilderrodrigues wants to merge 6 commits into
apache:masterfrom
schubergphilis:fix/CLOUDSTACK-8616
Closed

wilderrodrigues wants to merge 6 commits into
apache:masterfrom
schubergphilis:fix/CLOUDSTACK-8616

Conversation

@wilderrodrigues

Copy link
Copy Markdown
Contributor

This PR contains some refactoring of the Python code used by the redundant routers and also a fix for the intermittent problem when running the rVPC component tests.

To summarise it:

  • If the KeepaloiveD configuration file changes, restart the service instead of reloading it.
  • Since we are configuring KeepaliveD/VRRP in no-preemptive mode, we no longer need priorities. As a matter of fact, the Management Server was not sending priorities to the routers anymore. The value used in the old configuration was defaulted to 99 in the Python code.
  • KeepaliveD and ConntractD, once configured in a router, will have a cronjob that will run on reboot. So, the services will be restarted without the need to wait for the management server to send some configuration and force a restart.
  • Installing KeepaliveD from Wheezy-Backports in order to have a newer version available.

I already squashed few commits of this PR so we wouldn't have to go through simple fixes/typos that happened during the tryouts. When opening the commits for review please note that the commit messages also contain the messages of the squashed commits.

Adding the cronjob to restart the KeepaliveD service on reboot helped to get a 60% success rate with the tests. Before that, the tests were failing very often: 4 out of 5 times.

I then added the "restart" when configuration changes instead of "reload". Once the change was applied, I successfully executed the tests 13 times. That gives confidence.

Tests can be executed with the following command:

nosetests --with-marvin --marvin-config=[your_configuration_file] -s -a tags=advanced,required_hardware=true component/test_vpc_redundant.py

Since there were changes on marvin/base.py - in the previous PR, you will need to build/upgrade your Marvin installation.

@DaanHoogland @bhaisaab @remibergsma, could you please have a look at this PR?

Cheers,
Wilder

   - We use no preempt mode with state set as EQUAL to both nodes, no need to have Priotities setup
   - Do not add IPs as comments to the configuration. If a new guest interface is added, the file will change anyway.
     - This was used in the past when keepalived would restart for each new interface added
   - Removed the long sleep form the tests: we now sleep 5 seconds per PF rule added

CLOUDSTACK-8616 - Fix keepalived.ts/2 files comparison

   - Add call to set_fault() in case of router transits to that state
   - Removing commented out code

CLOUDSTACK-8616 - Fixing check_heartbeat.sh.templ

CLOUDSTACK-8616 - Call set_fault from the check_heartbeat.sh script
   - Runs check_heartbeat.sh every 30 seconds

CLOUDSTACK-861 - Copy/Paste error

   - Paste the wrong command in the crontab line.
   - preempt delay reverted on version 1.2.13 - from the backports
     - vrrp : Revert "Honor preempt_delay setting on startup.".
     - See changelog: http://www.keepalived.org/changelog.html
   - Refactoring some variable names to avoid misunderstanding
@asfbot

asfbot commented Jul 14, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #46 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 14, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #742 SUCCESS
This pull request looks good

@wilderrodrigues wilderrodrigues changed the title CLOUDSTACK-8616: Redundant VPR with both routers as Master CLOUDSTACK-8616: Redundant VPC with both routers as Master Jul 14, 2015

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any package related change needs to go into: tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
AFAIK, this buildsystemvm script is not used or maintained by anyone

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a good point, @bhaisaab . I blindly trusted the script and did not check the version before. I just created a rVPC and checked the router to confirm that the version was not updated. I will fix that one, test and push to the PR.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed with @wilderrodrigues : will add a note in this PR that this file is being phased out

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the following not to the file and will push it to the PR:

IMPORTANT REMARK
Package intallation is no longer done via this script. We are not removing the code yet, but we want to
make sure that everybody willing to install/update packages should refer to the file:
==> cloud-tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh

Is it good enough?

Cheers,
Wilder

…stemvm_packages.sh

   - Adding keepalived installation in the right script. I added the change on the buildsystemvm.sh, which is no longer used.
@asfbot

asfbot commented Jul 14, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #47 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 14, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #743 SUCCESS
This pull request looks good

@yadvr

yadvr commented Jul 16, 2015

Copy link
Copy Markdown
Member

LGTM, though did not test it due to lack of time and test infrastructure.

…mvm.sh

   - For package installation/update please refer to: cloud-tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh
@asfbot

asfbot commented Jul 16, 2015

Copy link
Copy Markdown

cloudstack-pull-rats #62 SUCCESS
This pull request looks good

@asfbot

asfbot commented Jul 16, 2015

Copy link
Copy Markdown

cloudstack-pull-requests #759 SUCCESS
This pull request looks good

@DaanHoogland

Copy link
Copy Markdown
Contributor

lgtm

@asfgit asfgit closed this in b29d8e7 Jul 16, 2015
maneesha-p pushed a commit to maneesha-p/cloudstack that referenced this pull request Jul 31, 2015
…mvm.sh

   - For package installation/update please refer to: cloud-tools/appliance/definitions/systemvmtemplate/install_systemvm_packages.sh

Signed-off-by: wilderrodrigues <wrodrigues@schubergphilis.com>

This closes apache#587
lasttime=$(cat $ROUTER_BIN_PATH/keepalived.ts2)
diff=$(($lasttime - $thistime))
s=0
if [ $diff -lt 30 ]

@jayakarteek jayakarteek Feb 14, 2018 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@wilderrodrigues @rhtyd why there is a change in time comparison logic.
if condition will never be true with the changes last-time will be less then this-time and diff will be negative.
So this will end up filling the logs in else condition

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jayakarteek please refer master/4.11 for latest code, why are you commenting on this very old PR?

yadvr pushed a commit that referenced this pull request Jan 20, 2021
In old UI we support creating snapshot from
VM snapshot by selecting one of the volume
belonging to VM. Allow the same in new UI

Co-authored-by: Rakesh Venkatesh <r.venkatesh@global.leaseweb.com>
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants