Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1362641

Summary: [Docs] [Director] Compute upgrade (7 to 8) fails without sourcing stackrc or overcloudrc between overcloud nova enable and upgrade-non-controller.sh
Product: Red Hat OpenStack Reporter: John Fulton <johfulto>
Component: documentationAssignee: Dan Macpherson <dmacpher>
Status: CLOSED CURRENTRELEASE QA Contact: RHOS Documentation Team <rhos-docs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 8.0 (Liberty)CC: dmacpher, johfulto, mburns, srevivo
Target Milestone: gaKeywords: Documentation
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-10-31 13:35:09 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:

Description John Fulton 2016-08-02 18:07:40 UTC
* Description of problem:

OSP8's "Director Installation and Usage" Chapter 10.4, "Upgrading the Overcloud", Step 4, "Upgrade each Compute node" [1], has the user run `nova service-disable`, `upgrade-non-controller.sh`, and then `nova service-enable`. This is fine, but it does not have the user source the overcloudrc before enabling or disabling the overcloud's compute service or source the stackrc before upgrading the undercloud's compute node (they're the same node but from a different context). What is in the doc does not work for me unless I source them in between [2]. Could the doc be updated to include sourcing the appropriate environment files in between the steps? 

[1] https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/paged/director-installation-and-usage/104-upgrading-the-overcloud

[2] 
source ~/stackrc
declare -A id_to_host
while read id hostname; do
    id_to_host[$id]=$hostname
done < <(nova list | grep compute | awk {'print $2,$4'} )

for id in "${!id_to_host[@]}"; do
    hostname=${id_to_host[$id]};
    source ~/overcloudrc
    nova service-disable $hostname.localdomain nova-compute
    source ~/stackrc
    upgrade-non-controller.sh --upgrade $id
    source ~/overcloudrc
    nova service-enable $hostname.localdomain nova-compute
done

* Version-Release number: Revision 8.0-0 Tue Nov 24 2015 Dan Macpherson
* How reproducible: deterministic
* Steps to Reproduce: follow document as written
* Actual results: compute nodes are not upgraded 
* Expected results: compute nodes are upgraded

Comment 6 Dan Macpherson 2016-10-19 03:38:51 UTC
Hi John,

This should be fixed now:

https://access.redhat.com/documentation/en/red-hat-openstack-platform/8/paged/director-installation-and-usage/104-upgrading-the-overcloud

Was there anything else required for this BZ?

Comment 7 John Fulton 2016-10-19 14:15:13 UTC
Dan,

It does not look fixed to me. 

Perhaps the fix is not in the document you linked above? I see runnings of the upgrade-non-controller.sh and runnings of the nova service-disable command but there is no sourcing of the stackrc of overcloudrc. 

  John

Comment 9 John Fulton 2016-10-31 13:28:15 UTC
Looks good to me. Thanks Dan.

Comment 10 Dan Macpherson 2016-10-31 13:35:09 UTC
Thanks, John. Closing this BZ.