Bug 1325349

Summary: rhel-osp-director: 7.3->8.0 overcloud upgrade from sat5 fails: An error has occurred:\n<type 'exceptions.IOError'>\nSee /var/log/up2date for more information
Product: Red Hat OpenStack Reporter: Alexander Chuzhoy <sasha>
Component: rhosp-directorAssignee: Jiri Stransky <jstransk>
Status: CLOSED NOTABUG QA Contact: Arik Chernetsky <achernet>
Severity: high Docs Contact:
Priority: high    
Version: 8.0 (Liberty)CC: dbecker, mburns, morazi, rhel-osp-director-maint
Target Milestone: async   
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-04-11 13:30:30 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 Alexander Chuzhoy 2016-04-08 13:37:19 UTC
rhel-osp-director: 7.3->8.0 overcloud upgrade from sat5 fails: An error has occurred:\n<type 'exceptions.IOError'>\nSee /var/log/up2date for more information


Environment:
openstack-tripleo-heat-templates-0.8.14-5.el7ost.noarch
openstack-puppet-modules-7.0.17-1.el7ost.noarch
openstack-tripleo-heat-templates-kilo-0.8.14-5.el7ost.noarch
instack-undercloud-2.2.7-2.el7ost.noarch



Steps to reproduce:
1. deploy overcloud 7.3
2. register the OC nodes with sat5 
3. attempt to complete the step with major-upgrade-pacemaker-init.yaml


Result:
The upgrade fails on major-upgrade-pacemaker-init.yaml step.
The error is:
An error has occurred:\n<type 'exceptions.IOError'>\nSee /var/log/up2date for more information
Goign to a machine and checking that up2date log:
Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 175, in <module>
    processCommandline()
  File "/usr/sbin/rhn-channel", line 85, in processCommandline
    tty = open("/dev/tty", "r+")
<type 'exceptions.IOError'>: [Errno 6] No such device or address: '/dev/tty'

[Fri Apr  8 13:16:56 2016] up2date logging into up2date server
[Fri Apr  8 13:16:56 2016] up2date successfully retrieved authentication token from up2date server
[Fri Apr  8 13:22:44 2016] up2date
Traceback (most recent call last):
  File "/usr/sbin/rhn-channel", line 175, in <module>
    processCommandline()
  File "/usr/sbin/rhn-channel", line 85, in processCommandline
    tty = open("/dev/tty", "r+")
<type 'exceptions.IOError'>: [Errno 6] No such device or address: '/dev/tty'

[Fri Apr  8 13:30:03 2016] up2date updateLoginInfo() login info


I'm able to execute yum update manually though on the OC machine.

yum repolist from the nodes:

rhel-x86_64-server-7
rhel-x86_64-server-7-ost-8
rhel-x86_64-server-7-ost-8-director
rhel-x86_64-server-extras-7
rhel-x86_64-server-ha-7


Expected result:
Successfully passed the step with major-upgrade-pacemaker-init.yaml.

Comment 2 Alexander Chuzhoy 2016-04-09 03:52:22 UTC
Deployment from sat5 succeeded after including yaml with the following during the /usr/share/openstack-tripleo-heat-templates/environments/major-upgrade-pacemaker-init.yaml step:
parameter_defaults:
  UpgradeInitCommand: |
    set -e
    rm -f /etc/sysconfig/rhn/systemid 2>/dev/null
    yum -y localinstall http://<SAT5 FQDN>/pub/<RPM NAME>
    rhnreg_ks --activationkey=1-rhos80 --serverUrl=https://<sat5 FQDN>/XMLRPC --sslCACert=/usr/share/rhn/RHN-ORG-TRUSTED-SSL-CERT  --force

Comment 4 Mike Burns 2016-04-11 13:30:30 UTC
This issue is notabug.  During the installation with registration to Sat 5, the certificate is downloaded and installed automatically.  It's not necessary to do it manually.

This environment was installed without registration, then manually added without the cert.

This is what is run:
pushd /usr/share/rhn/
curl -k -O $REG_SAT_URL/pub/RHN-ORG-TRUSTED-SSL-CERT
popd
rhnreg_ks --serverUrl=$REG_SAT_URL/XMLRPC $sat5_opts