Ocata -> Pike undercloud upgrade: stack user is not able to connect to docker daemon after undercloud upgrade

Bug #1699477 reported by Marius Cornea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Expired
Undecided
Unassigned

Bug Description

Ocata -> Pike undercloud upgrade: stack user is not able to connect to docker daemon after undercloud upgrade:

[stack@undercloud-0 ~]$ openstack undercloud upgrade

#############################################################################
Undercloud upgrade complete.

The file containing this installation's passwords is at
/home/stack/undercloud-passwords.conf.

There is also a stackrc file at /home/stack/stackrc.

These files are needed to interact with the OpenStack services, and should be
secured.

#############################################################################

[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$
[stack@undercloud-0 ~]$ docker ps
Cannot connect to the Docker daemon. Is the docker daemon running on this host?

After exiting the current shell session it is able to connect to the daemon:

[stack@undercloud-0 ~]$ logout
[root@undercloud-0 ~]# su - stack
Last login: Wed Jun 21 09:42:25 UTC 2017 on pts/2
[stack@undercloud-0 ~]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES

Tags: upgrade
Revision history for this message
Brent Eagles (beagles) wrote :

stack user is added to docker group during upgrade/install, but group membership will not take effect until stack user logs out and back in or the host is restarted.

Changed in tripleo:
status: New → Confirmed
Changed in tripleo:
status: Confirmed → Triaged
Changed in tripleo:
milestone: pike-3 → pike-rc1
Changed in tripleo:
milestone: pike-rc1 → queens-1
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Hi,

there is no proper solution to this. There is only one way to have the group taken into account for the current shell after modifying the user's group membership:

  newgrp docker # start a subshell whose group is docker
  newgrp stack # start a subshell whose group is stack

in that last subshell you can directly "docker ps" without reloging.

The problem is that it would only work if we keep the process where we triggers those commands in a shell opened as a child of the undercloud.py command.

One side effect will be that the history of the user will be as it was before his/her last login which might surprise the user.

The other is that the user will be in a subshell of the still running openstack undercloud command, which doesn't /feel/ right.

One last issue is that in automation the undercloud command would appears like a never ending one.

So I'm open to discussion, but beside telling adding a comment telling the user that he/she needs to login/logout I'm not sure there is a proper solution.

Changed in tripleo:
milestone: queens-1 → queens-2
Changed in tripleo:
milestone: queens-2 → queens-3
Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Revision history for this message
Emilien Macchi (emilienm) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (FUTURE, PIKE, QUEENS, ROCKY, STEIN).
  Valid example: CONFIRMED FOR: FUTURE

Changed in tripleo:
importance: Medium → Undecided
status: Triaged → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.