CLOUDSTACK-9641 In KVM SSVM and CPVM may use the old cmdline data, if… - #2121
Conversation
ACS CI BVT RunSumarry: Link to logs Folder (search by build_no): https://www.dropbox.com/sh/r2si930m8xxzavs/AAAzNrnoF1fC3auFrvsKo_8-a?dl=0 Failed tests: Skipped tests: Passed test suits: |
| } | ||
| } | ||
|
|
||
| File pemFile=new File("/root/.ssh/id_rsa.cloud"); |
There was a problem hiding this comment.
libvirtComputingResource.SSHPRVKEYPATH can be used instead
e127036 to
9d575cf
Compare
| NicVO nic = _nicsDao.getControlNicForVM(vm.getId()); | ||
| return nic.getIPv4Address(); | ||
| } | ||
| else if(vm.getType()== VirtualMachine.Type.DomainRouter) return vm.getPrivateIpAddress(); |
There was a problem hiding this comment.
except If coding convention ... code LGTM
|
test_ssvm.py was also run by CI pasting the results xml file here. |
|
|
||
| File pemFile=new File(LibvirtComputingResource.SSHPRVKEYPATH); | ||
| try { | ||
| if(vmName.contains("s-") || vmName.contains("v-")){ |
There was a problem hiding this comment.
Using startsWith() is better here.
| } catch (final LibvirtException e) { | ||
| s_logger.debug("unable to stop VM:"+vmName+" due to"+e.getMessage()); | ||
| try{ | ||
| if(vmName.contains("s-") || vmName.contains("v-")) |
9d575cf to
3c80f00
Compare
|
Made the suggested changes. |
… we fail to fetch the new cmdline in the first pass.
|
Code LGTM |
If we fail to fetch the new cmdline, we do not fail ssvm start. we end up using the old cmdline. So to fix this we are moving the oldcmdline to backup and if we do not find the new one, we fail and restore the old cmdline back.