-
Notifications
You must be signed in to change notification settings - Fork 56
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
ncm-spma: yumng: Major improvements #1190
Conversation
- run all operations in one single transaction - use saner repository consistency check and display less criptic message once YUM repos are broken - always refresh YUM metadata - use less verbose and more readable output - warn in case transaction (not) installed/removed expected packages - avoid breaking transaction by protected packages (mainly systemd)
Can one of the admins verify this patch? |
test this please |
ncm-spma/src/main/perl/spma/yumng.pm
Outdated
@@ -12,17 +12,14 @@ use warnings; | |||
use NCM::Component; | |||
our $EC = LC::Exception::Context->new->will_store_all; | |||
our @ISA = qw(NCM::Component); | |||
use EDG::WP4::CCM::Path 16.8.0 qw(unescape); | |||
use EDG::WP4::CCM::Element qw(unescape); |
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.
please revert
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.
It would help to describe why ;-)
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.
ncm-spma/src/main/perl/spma/yumng.pm
Outdated
} | ||
# End here in case of --noaction. | ||
if ($NoAction) { | ||
return 1; |
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.
add a info message of some sort
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.
The message is already there:
[INFO] Dry run, no changes will be performed (--noaction flag set)
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.
and:
[INFO] running component: spma
---------------------------------------------------------
[INFO] would mark state of component as needing to run
[INFO] note: running component spma in noaction mode
in the component directly. Assuming we don't need to add this message for the third time in the log.
FYI: this code runs in our env for several months en-masse now. It's well tested. Feel free to report any problems should you encounter some. |
@jnovy can you also cleanup the description? it still has the template text |
ncm-spma/src/main/perl/spma/yumng.pm
Outdated
@@ -180,12 +114,12 @@ sub Configure | |||
|
|||
my $repos = $config->getElement(REPOS_TREE)->getTree(); | |||
my $t = $config->getElement(CMP_TREE)->getTree(); | |||
|
|||
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.
Can you strip this white-space please.
ncm-spma/src/main/perl/spma/yumng.pm
Outdated
# Display system info | ||
if ( defined($t->{quattor_os_release}) ) { | ||
$self->info("target OS build: ", $t->{quattor_os_release}); | ||
} | ||
|
||
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.
Can you strip this white-space please.
This change improves resiliency and speed by running all installs and removals in one transation. There were consistency issues in previous version when yumng executed updates in multiple steps. That was causing update to fail despite it could be successfully executed in one step. Full list of changes follow. - run all operations in one single transaction - use saner repository consistency check and display less cryptic message once YUM repos are broken - always refresh YUM metadata - use less verbose and more readable output - warn in case transaction installed/removed unexpected packages - avoid breaking transaction by protected packages (mainly systemd)
Seems automatic tests got stuck at some point? |
@hpcugentbot test this please |
less criptic message once YUM repos are broken
expected packages
(mainly systemd)