[doc] Replace su with sudo

Bug #1938148 reported by Marek Tamaskovic
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
devstack
Fix Released
Wishlist
Unassigned

Bug Description

This bug tracker is for errors with the documentation, use the following as a template and remove or add fields as you see fit. Convert [ ] into [x] to check boxes:

- [X] This doc is inaccurate in this way:
https://docs.openstack.org/devstack/latest/
Using sudo and su creates inconsistent environment and it is not recommended to use them in this way (`sudo su - stack`).

- [ ] This is a doc addition request.
- [X] I have a fix to the document that I can paste below including example: input and output.

Use instead a

`sudo -u stack -i`
It will spawn an interactive shell with user 'stack'. Much convenient way to use sudo.

If you have a troubleshooting or support issue, use the following resources:

 - The mailing list: https://lists.openstack.org
 - IRC: 'openstack' channel on OFTC

-----------------------------------
Release: on 2021-05-19 10:22:18
SHA: d51d5196eecf654ab17bb6522fda60c598a98b54
Source: https://opendev.org/openstack-dev/devstack/src/doc/source/index.rst
URL: https://docs.openstack.org/devstack/latest/

Revision history for this message
Martin Kopec (mkopec) wrote :

I'm sorry, I don't follow, is this a template and should be used for creating new doc bugs or is it a bug report which should be addressed?

Revision history for this message
Marek Tamaskovic (mtamasko) wrote : Re: [Bug 1938148] Re: DevStack in DevStack

Hello, It's a bug to be addressed.

Regards
Marek

On Tue, Jul 27, 2021 at 5:22 PM Martin Kopec <email address hidden>
wrote:

> I'm sorry, I don't follow, is this a template and should be used for
> creating new doc bugs or is it a bug report which should be addressed?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1938148
>
> Title:
> DevStack in DevStack
>
> Status in devstack:
> New
>
> Bug description:
>
> This bug tracker is for errors with the documentation, use the
> following as a template and remove or add fields as you see fit.
> Convert [ ] into [x] to check boxes:
>
> - [X] This doc is inaccurate in this way:
> https://docs.openstack.org/devstack/latest/
> Using sudo and su creates inconsistent environment and it is not
> recommended to use them in this way (`sudo su - stack`).
>
> - [ ] This is a doc addition request.
> - [X] I have a fix to the document that I can paste below including
> example: input and output.
>
> Use instead a
>
> `sudo -u stack -i`
> It will spawn an interactive shell with user 'stack'. Much convenient
> way to use sudo.
>
> If you have a troubleshooting or support issue, use the following
> resources:
>
> - The mailing list: https://lists.openstack.org
> - IRC: 'openstack' channel on OFTC
>
> -----------------------------------
> Release: on 2021-05-19 10:22:18
> SHA: d51d5196eecf654ab17bb6522fda60c598a98b54
> Source:
> https://opendev.org/openstack-dev/devstack/src/doc/source/index.rst
> URL: https://docs.openstack.org/devstack/latest/
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/devstack/+bug/1938148/+subscriptions
>
>

Revision history for this message
Radosław Piliszek (yoctozepto) wrote : Re: DevStack in DevStack

Martin, the user suggests to avoid using ``su`` in docs. I think this makes sense. Obviously, this is far from breaking any real life scenario, especially where devstack is to be used.

summary: - DevStack in DevStack
+ [doc] Replace su with sudo
Changed in devstack:
importance: Undecided → Wishlist
status: New → Triaged
Changed in devstack:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to devstack (master)

Reviewed: https://review.opendev.org/c/openstack/devstack/+/802738
Committed: https://opendev.org/openstack/devstack/commit/524487728e85388c73ececae3f2eb272321cffc7
Submitter: "Zuul (22348)"
Branch: master

commit 524487728e85388c73ececae3f2eb272321cffc7
Author: Marek Tamaskovic <email address hidden>
Date: Wed Jul 28 16:54:50 2021 +0200

    Fix opening shell as user 'stack'

    The usage of sudo with su is not recommended. It results in incosnistent
    environment variables. Instead use just sudo with appropriate arguments.
    The argument '-u stack' specifies that the sudo will execute as user 'stack'.
    The last argument '-i' will launch an interactive shell.

    Closes-Bug: #1938148

    Change-Id: I42387660480377cdf9a0b04f190e7e1f21fb354f

Changed in devstack:
status: In Progress → Fix Released
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.