Skip to content

scripts: parametrize systemvm, router restart#6574

Merged
DaanHoogland merged 5 commits intoapache:mainfrom
shapeblue:add-sysvmadm-parameterize
Dec 19, 2022
Merged

scripts: parametrize systemvm, router restart#6574
DaanHoogland merged 5 commits intoapache:mainfrom
shapeblue:add-sysvmadm-parameterize

Conversation

@shwstppr
Copy link
Copy Markdown
Contributor

Description

Fixes #6220

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

[root@ref-trl-3339-v-M7-abhishek-kumar-mgmt1 ~]# /usr/bin/cloudstack-sysvmadm

The tool stopping/starting running system vms and domain routers 

Usage: cloudstack-sysvmadm: [-d] [-u] [-p] [-m] [-s] [-r] [-a] [-t] [-n] [-z] [-i] [-j] [-v] [-i] [-j]

 -d - cloud DB server ip address, defaulted to localhost if not specified 
 -u - user name to access cloud DB, defaulted to root if not specified 
 -p - cloud DB user password, defaulted to no password if not specified 

 -m - the ip address of management server, defaulted to localhost if not specified

 -s - stop then start all running SSVMs and Console Proxies 
 -r - stop then start all running Virtual Routers
 -a - stop then start all running SSVMs, Console Proxies, and Virtual Routers 
 -n - restart all Guest networks 
 -t - number of parallel threads used for stopping Domain Routers. Default is 10.
 -l - log file location. Default is cloud.log under current directory.
 -z - do restart only for the instances in the specific zone. If not specified, restart will apply to instances in all zones
 -v - do restart all VPCs in the entire system
 -i - do restart on instances with specific IDs. Comma-separated instance IDs to be provided. Works ony when restarting SSVMs, CPVMs or VRs
 -j - do restart on instances from the specified database table. If not specified, restart will apply on instances present in cloud.vm_instance database table. Works ony when restarting SSVMs, CPVMs or VRs
[root@ref-trl-3339-v-M7-abhishek-kumar-mgmt1 ~]# /usr/bin/cloudstack-sysvmadm -a -u root -p P@ssword123 -i 9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9

Stopping and starting 1 secondary storage vm(s) with id=9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9...
Done stopping and starting secondary storage vm(s) with id=9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9

Stopping and starting 1 console proxy vm(s) with id=9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9...
Done stopping and starting console proxy vm(s)  with id=9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9.

Stopping and starting 0 running routing vm(s) with id=9b802cd9-8d97-42dc-9610-2650a2831fee,2f1d6bc1-7143-42b7-a5b7-2383d4eddcb9... 

Fixes apache#6220

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@acs-robot
Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6574 (SL-JID-2012)

Copy link
Copy Markdown
Member

@yadvr yadvr left a comment

Choose a reason for hiding this comment

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

needs manual qa, otherwise LGTM

@shwstppr shwstppr marked this pull request as ready for review July 29, 2022 12:52
@yadvr yadvr added this to the 4.17.1.0 milestone Aug 17, 2022
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@acs-robot
Copy link
Copy Markdown

Found UI changes, kicking a new UI QA build
@blueorangutan ui

@blueorangutan
Copy link
Copy Markdown

@acs-robot a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

UI build: ✔️
Live QA URL: http://qa.cloudstack.cloud:8080/client/pr/6574 (SL-JID-2168)

@sonarqubecloud
Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 17, 2022

Codecov Report

❗ No coverage uploaded for pull request base (main@4b8af6f). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main    #6574   +/-   ##
=======================================
  Coverage        ?   11.50%           
  Complexity      ?     7532           
=======================================
  Files           ?     2492           
  Lines           ?   246775           
  Branches        ?    38559           
=======================================
  Hits            ?    28387           
  Misses          ?   214791           
  Partials        ?     3597           

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@shwstppr shwstppr modified the milestones: 4.17.1.0, 4.18.0.0 Aug 18, 2022
@shwstppr shwstppr changed the base branch from 4.17 to main August 18, 2022 12:21
@yadvr
Copy link
Copy Markdown
Member

yadvr commented Oct 8, 2022

@shwstppr is this good for review/merge?

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

Copy link
Copy Markdown
Member

@weizhouapache weizhouapache left a comment

Choose a reason for hiding this comment

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

code lgtm
left 2 minor comments


usage() {
printf "\nThe tool stopping/starting running system vms and domain routers \n\nUsage: %s: [-d] [-u] [-p] [-m] [-s] [-r] [-a] [-t] [-n] [-z] [-v]\n\n -d - cloud DB server ip address, defaulted to localhost if not specified \n -u - user name to access cloud DB, defaulted to "root" if not specified \n -p - cloud DB user password, defaulted to no password if not specified \n\n -m - the ip address of management server, defaulted to localhost if not specified\n\n -s - stop then start all running SSVMs and Console Proxies \n -r - stop then start all running Virtual Routers\n -a - stop then start all running SSVMs, Console Proxies, and Virtual Routers \n -n - restart all Guest networks \n -t - number of parallel threads used for stopping Domain Routers. Default is 10.\n -l - log file location. Default is cloud.log under current directory.\n -z - do restart only for the instances in the specific zone. If not specified, restart will apply to instances in all zones\n -v - do restart all VPCs in the entire system\n\n" $(basename $0) >&2
printf "\nThe tool stopping/starting running system vms and domain routers \n\nUsage: %s: [-d] [-u] [-p] [-m] [-s] [-r] [-a] [-t] [-n] [-z] [-i] [-j] [-v] [-i] [-j]\n\n -d - cloud DB server ip address, defaulted to localhost if not specified \n -u - user name to access cloud DB, defaulted to "root" if not specified \n -p - cloud DB user password, defaulted to no password if not specified \n\n -m - the ip address of management server, defaulted to localhost if not specified\n\n -s - stop then start all running SSVMs and Console Proxies \n -r - stop then start all running Virtual Routers\n -a - stop then start all running SSVMs, Console Proxies, and Virtual Routers \n -n - restart all Guest networks \n -t - number of parallel threads used for stopping Domain Routers. Default is 10.\n -l - log file location. Default is cloud.log under current directory.\n -z - do restart only for the instances in the specific zone. If not specified, restart will apply to instances in all zones\n -v - do restart all VPCs in the entire system\n -i - do restart on instances with specific IDs. Comma-separated instance IDs to be provided. Works ony when restarting SSVMs, CPVMs or VRs\n -j - do restart on instances from the specified database table. If not specified, restart will apply on instances present in cloud.vm_instance database table. Works ony when restarting SSVMs, CPVMs or VRs\n\n" $(basename $0) >&2
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.

duplicated [-i] [-j]

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.

@shwstppr
can you organize this by multiple lines ? it is hard to review.

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.

@weizhouapache refactored

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✖️ el8 ✖️ debian ✖️ suse15. SL-JID 4881

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4902

@blueorangutan
Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 4982

@DaanHoogland
Copy link
Copy Markdown
Contributor

@blueorangutan test matrix

@blueorangutan
Copy link
Copy Markdown

@DaanHoogland a Trillian-Jenkins matrix job (centos7 mgmt + xs71, centos7 mgmt + vmware65, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@shwstppr
Copy link
Copy Markdown
Contributor Author

@DaanHoogland I don't think the script, this PR changes, is called by the management server or any agent

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5528)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 39666 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6574-t5528-xenserver-71.zip
Smoke tests completed. 105 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File

@blueorangutan
Copy link
Copy Markdown

Trillian test result (tid-5529)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 44535 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6574-t5529-kvm-centos7.zip
Smoke tests completed. 104 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_01_vpc_site2site_vpn_multiple_options Failure 497.08 test_vpc_vpn.py
test_01_vpc_site2site_vpn Failure 395.24 test_vpc_vpn.py

@DaanHoogland DaanHoogland merged commit 87b25b9 into apache:main Dec 19, 2022
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.

Parametrize data source table for virtual routetrs to support migration

6 participants