Bug 1435446
Summary: | Trigger yum update after RHELRegistration in initial deployment | ||
---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> |
Component: | openstack-tripleo-heat-templates | Assignee: | Alex Schultz <aschultz> |
Status: | CLOSED ERRATA | QA Contact: | Gurenko Alex <agurenko> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 10.0 (Newton) | CC: | aschultz, mburns, ohochman, rhel-osp-director-maint, tvignaud |
Target Milestone: | ga | Keywords: | Triaged |
Target Release: | 12.0 (Pike) | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | openstack-tripleo-heat-templates-7.0.0-0.20170616123155.el7ost | Doc Type: | If docs needed, set a value |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2017-12-13 21:20:39 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Andreas Karis
2017-03-23 20:20:03 UTC
[stack@undercloud-4 rhel-registration]$ diff -c /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml /home/stack/templates/rhel-registration/rhel-registration.yaml *** /usr/share/openstack-tripleo-heat-templates/extraconfig/pre_deploy/rhel-registration/rhel-registration.yaml 2017-01-02 19:14:26.000000000 -0500 --- /home/stack/templates/rhel-registration/rhel-registration.yaml 2017-03-23 16:34:13.541312274 -0400 *************** *** 118,123 **** --- 118,151 ---- input_values: REG_METHOD: {get_param: rhel_reg_method} + YumUpdateConfigurationAfterRHELRegistration: + type: OS::Heat::SoftwareConfig + properties: + group: script + config: | + #!/bin/bash + set -x + list_updates=$(yum list -q updates) + if [[ "$list_updates" == "" ]]; then + echo "No packages require updating" + exit 0 + fi + full_command="yum -q -y update" + echo "Running: $full_command" + result=$($full_command) + return_code=$? + echo "$result" + echo "yum return code: $return_code" + + UpdateDeploymentAfterRHELRegistration: + type: OS::Heat::SoftwareDeployment + depends_on: RHELRegistrationDeployment + properties: + name: UpdateDeploymentAfterRHELRegistration + config: {get_resource: YumUpdateConfigurationAfterRHELRegistration} + server: {get_param: server} + actions: ['CREATE'] # Only do this on CREATE + outputs: deploy_stdout: description: Deployment reference, used to trigger puppet apply on changes Coming to think of it, this may actually be a design decision (not to run any packet updates). If this is the case, feel free to close out this bug report. No we have a similar bug upstream LP#1640894 which describes something similar situation so this sounds like a reasonable feature request for future releases. I'm not sure on a backport but I'll at least propose it upstream. Looking at the upstream bug, does this mean that if we simply set a dummy value for: UpdateIdentifer ... that this will trigger an initial update? So tracing through, it seems that if you set UpdateIdentifier it will perform a yum -y update as part of the deployment and switch to use the latest version of the packages available. So would that work for you in this case or do we need to specifically need to run a yum update immediately after registering and before doing anything else? Verified with build 2017-12-06.2 Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2017:3462 |