Bug 1466410 - M->N upgrade causes losing ssh access to undercloud
Summary: M->N upgrade causes losing ssh access to undercloud
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: instack-undercloud
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: z11
: 10.0 (Newton)
Assignee: Sofer Athlan-Guyot
QA Contact: Amit Ugol
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-29 14:16 UTC by Yolanda Robla
Modified: 2019-04-30 16:59 UTC (History)
11 users (show)

Fixed In Version: instack-undercloud-5.3.7-7.el7ost
Doc Type: Bug Fix
Doc Text:
This update corrects a selinux permissions error that caused loss of ssh access after upgrading from a non-selinux undercloud.
Clone Of:
Environment:
Last Closed: 2019-04-30 16:58:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1711564 0 None None None 2017-08-18 10:23:36 UTC
OpenStack gerrit 495157 0 None None None 2017-08-18 10:23:03 UTC
OpenStack gerrit 525194 0 None None None 2018-01-30 10:37:58 UTC
OpenStack gerrit 525911 0 None None None 2018-08-10 09:41:37 UTC
OpenStack gerrit 528698 0 None None None 2018-08-10 09:43:04 UTC
Red Hat Product Errata RHBA-2019:0921 0 None None None 2019-04-30 16:59:10 UTC

Description Yolanda Robla 2017-06-29 14:16:47 UTC
Description of problem:


After doing the major upgrade in the undercloud from 9 to 10, i cannot enter by ssh to the undercloud anymore.
The issue is caused by selinux, because there is a wrong context for /home/stack/.ssh/authorized_keys:

cd /home/stack/.ssh/
[root@undercloud .ssh]# ls -lZ authorized_keys 
-rw-------. stack stack system_u:object_r:unlabeled_t:s0 authorized_keys
[root@undercloud .ssh]# restorecon authorized_keys
Full path required for exclude: net:[4026532200].
Full path required for exclude: net:[4026532200].
[root@undercloud .ssh]# ls -lZ authorized_keys 
-rw-------. stack stack system_u:object_r:ssh_home_t:s0  authorized_keys

After properly restoring the context, that needs to be ssh_home_t (not unlabeled_t), i can ssh to the undercloud again.

Comment 1 Yolanda Robla 2017-07-12 10:11:33 UTC
To clarify, i come from previous versions, upgrading from 8->9 then 9->10. When i upgrade to 9, i see that the authorized_keys is also labeled incorrectly, with system_u:object_r:unlabeled_t:s0 .
But it works, because selinux in 9 is set to Permissive. When going to 10, it's set to Enforcing, and this bad labeling is causing to loose access.

Comment 2 Carlos Camacho 2018-08-10 09:47:45 UTC
All the fixes are in place and they are so old that fixes should be available from the imports.

Comment 23 errata-xmlrpc 2019-04-30 16:58:51 UTC
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/RHBA-2019:0921


Note You need to log in before you can comment on or make changes to this bug.