CLOUDSTACK-9503: Increased the VR script timeout. Most of the changes…#1678
CLOUDSTACK-9503: Increased the VR script timeout. Most of the changes…#1678abhinandanprateek wants to merge 1 commit intoapache:4.9from
Conversation
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-8 |
|
@abhinandanprateek please fix noredist/vmware issue: [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project cloud-plugin-hypervisor-vmware: Compilation failure: Compilation failure: |
e90511d to
f46f774
Compare
|
@rhtyd fixed it, not sure why that was not caught by jenkins build. |
|
@abhinandanprateek jenkins does not do noredist builds |
|
Packaging result: ✖centos6 ✖centos7 ✖debian. JID-12 |
|
@abhinandanprateek error: [INFO] Compiling 51 source files to /jenkins/workspace/acs-pr-centos6-pkg-builder/dist/rpmbuild/BUILD/cloudstack-4.9.1.0-SNAPSHOT/plugins/hypervisors/vmware/target/classes |
f46f774 to
659cb71
Compare
|
@rhtyd thanks for sharing nordist repo. I have sanitized the vmware plugin too. |
jburwell
left a comment
There was a problem hiding this comment.
@abhinandanprateek this is a really nice change. Moving from using an int to Duration will make time handling code far less error prone.
Reading through the PR, I think we need to run smoke tests with requires_hardware=true + the VR component test suites on VMware, KVM, and XenServer. Do you agree?
There was a problem hiding this comment.
To avoid any potential unit conversion issues, consider using the ``Duration. multipliedBy(int)` method.
There was a problem hiding this comment.
Please consider extract 120L to a constant of type Duration to intent more clear and provide further unit conversion safety (e.g. MINIMUM_VR_RESTART_TIMEOUT).
There was a problem hiding this comment.
Consider using the previously defined constant here for ensured consistency between he check and the value used.
There was a problem hiding this comment.
Please consider defining an override of the SshHelper.sshExecute method that accepts a Duration in order to encapsulate this conversion. We should also consider deprecating the version that accepts int.
There was a problem hiding this comment.
Please consider adding an overridden version of the Script(String, int, Logger) constructor that accepts a Duration instance to encapsulate this conversion.
There was a problem hiding this comment.
Scripts is an external package, hope they will upgrade to Duration after Java 1.8.
There was a problem hiding this comment.
Please consider adding an overridden version of the Script(String, int, Logger) constructor that accepts Duration to encapsulate this type conversion.
There was a problem hiding this comment.
Scripts is an external package, hope they will upgrade to Duration after Java 1.8.
There was a problem hiding this comment.
@abhinandanprateek the Script class is in the com.cloud.utils.script which is part of the project. What prevents us from adding a constructor that class?
There was a problem hiding this comment.
@jburwell yes you are right, we should modify the script class to take duration as timeout instead of long.
There was a problem hiding this comment.
Please consider extracting Duration.standardSeconds(600L) to constant to clarify the intent.
There was a problem hiding this comment.
Please consider extracting Duration.standardSeconds(120L) to a constant to clarify intent
There was a problem hiding this comment.
Please consider adding an overridden version of the SshHelper.sshExecute(String, int, String, String, ??, String, int, int, int) method that accepts Duration to encapsulate this type conversion.
There was a problem hiding this comment.
Please consider adding an overridden version of the SshHelper.sshExecute(String, int, String, String, ??, String, int, int, int) method that accepts Duration to encapsulate this type conversion.
81d0d9c to
6fdfd9d
Compare
|
@jburwell updated Script to use Duration as timeout. |
| int timeout = answerCounts * _eachTimeout; | ||
| if (timeout < 120) { | ||
| timeout = 120; | ||
| Duration timeout = _eachTimeout.withDurationAdded(_eachTimeout.getStandardSeconds(), answerCounts); |
There was a problem hiding this comment.
Why use withDurationAdded rather multipliedBy? Passing _eachTimeout into the method is an indication that multipliedBy may be a more concise expression of intent.
There was a problem hiding this comment.
@jburwell the java Duration that has multipliedBy is available from Java 8. Right now we are using joda.time.
|
@abhinandanprateek could you please create a ticket to refactor |
|
@abhinandanprateek how difficult would it be to change the base branch of this PR to 4.8? |
6fdfd9d to
04c990e
Compare
|
@jburwell ticket filed to refactor Script and SshHelper to use Duration. https://issues.apache.org/jira/browse/CLOUDSTACK-9508 |
|
@karuturi Jenkins fail on find-bug: [ERROR] Failed to execute goal org.codehaus.mojo:findbugs-maven-plugin:3.0.3:findbugs (findbugs) on project cloud-plugin-network-bigswitch: Execution findbugs of goal org.codehaus.mojo:findbugs-maven-plugin:3.0.3:findbugs failed: Java returned: 143 I did not make any changes there, do you know if it is failing elsewhere too ? Or it is just some spurious failure. |
|
I think the build timed out.
|
|
@abhinandanprateek it appears that there is a Findbugs issue that needs to be addressed. |
… are about converting int/long time values to joda Duration.
04c990e to
4032a5e
Compare
|
@jburwell there was some issue with jenkins, force pushing PR resolved it. |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✔centos6 ✔centos7 ✔debian. JID-84 |
|
@blueorangutan test centos6 kvm |
|
@jburwell a Trillian-Jenkins test job (centos6 mgmt + kvm) has been kicked to run smoke tests |
|
@abhinandanprateek this fix seems like a good fix for 4.8 users as well which I would like to get included in 4.8.2.0, as well as, 4.9.1.0 and 4.10.0.0. Could rebase this PR and change the base branch to 4.8? |
… are about converting int/long time values to Duration.