-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use juju-run to invoke juju-reboot for unit reboot #575
Use juju-run to invoke juju-reboot for unit reboot #575
Conversation
Issue #921 has the context for the change: in order to avoid triggering reboots asynchronously to juju hook executions (when `juju ssh reboot` is done). openstack-charmers/zaza-openstack-tests#921
generic_utils.juju_reboot(_unit) | ||
self.subprocess.check_call.assert_called_once_with( | ||
['juju', 'ssh', _unit, | ||
f'sudo juju-run -u {_unit} "juju-reboot --now"']) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We tend not to use f-strings in zaza purely due to the python3.5 support. We need to formally make a break on it, but zaza still tentatively supports py35!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Addressed in 7417002
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test code still uses the f-string? I see the code-under-test does use .format()
.
Now all the functional tests are failing, which is unrelated to the changes. |
Codecov ReportBase: 89.22% // Head: 89.19% // Decreases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## master #575 +/- ##
==========================================
- Coverage 89.22% 89.19% -0.03%
==========================================
Files 44 44
Lines 4594 4610 +16
==========================================
+ Hits 4099 4112 +13
- Misses 495 498 +3
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
I gave it a try here https://review.opendev.org/c/x/charm-ovn-dedicated-chassis/+/857878/2#message-37afbdf3f745d77719aa43afe5234aaa87d70468 but got an unrelated failure which actually has to do with a regression I introduced to charm-layer-ovn (openstack-charmers/charm-layer-ovn#71 - a fix). When a fix is landed I'll give it another go. |
Okay, sounds good. |
Raised https://review.opendev.org/c/x/charm-ovn-chassis/+/858491 to help test this change instead of the in-flight review on the ovn-dedicated-chassis charm. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
To me it appears the author has addressed the review comments falling back to .format
in the runtime code, and I know you're busy with other stuff. So in the interest of foreward movement I'll push forward. You're right in the unit test containing a f-string, and the gate check for zaza itself is Python 3.6+.
Issue #921 has the context for the change: in order to avoid triggering
reboots asynchronously to juju hook executions (when
juju ssh reboot
is done).
openstack-charmers/zaza-openstack-tests#921