Verify operation in nova

Bug #1764530 reported by Leonardo Richero
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Low
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:

When say to run the command:
nova-status upgrade check

it fails unless I run it as a root. But the documentation doesn't say it.
I don't know if I make a mistake during the install, or if I should run it as a root.

When run as unprivileged user the output is:

$ nova-status upgrade check
Error:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/nova/cmd/status.py", line 459, in main
    ret = fn(*fn_args, **fn_kwargs)
  File "/usr/lib/python2.7/dist-packages/nova/cmd/status.py", line 389, in check
    result = func(self)
  File "/usr/lib/python2.7/dist-packages/nova/cmd/status.py", line 133, in _check_cellsv2
    meta.bind = db_session.get_api_engine()
  File "/usr/lib/python2.7/dist-packages/nova/db/sqlalchemy/api.py", line 152, in get_api_engine
    return api_context_manager.get_legacy_facade().get_engine()
  File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 791, in get_legacy_facade
    return self._factory.get_legacy_facade()
  File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 342, in get_legacy_facade
    self._start()
  File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 484, in _start
    engine_args, maker_args)
  File "/usr/lib/python2.7/dist-packages/oslo_db/sqlalchemy/enginefacade.py", line 506, in _setup_for_connection
    "No sql_connection parameter is established")
CantStartEngineError: No sql_connection parameter is establishe

When run as root the output is:

# nova-status upgrade check
+---------------------------+
| Upgrade Check Results |
+---------------------------+
| Check: Cells v2 |
| Result: Success |
| Details: None |
+---------------------------+
| Check: Placement API |
| Result: Success |
| Details: None |
+---------------------------+
| Check: Resource Providers |
| Result: Success |
| Details: None |
+---------------------------+

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

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

 - Ask OpenStack: http://ask.openstack.org
 - The mailing list: http://lists.openstack.org
 - IRC: 'openstack' channel on Freenode

-----------------------------------
Release: 17.0.3.dev7 on 2018-04-13 23:03
SHA: fda768b304e05821f7479f9698c59d18bf3d3516
Source: https://git.openstack.org/cgit/openstack/nova/tree/doc/source/install/verify.rst
URL: https://docs.openstack.org/nova/queens/install/verify.html

Tags: doc
tags: added: doc
Revision history for this message
Matt Riedemann (mriedem) wrote :

I guess I assume that nova-manage and nova-status commands are always run as root since they are administrative level commands.

Revision history for this message
Matt Riedemann (mriedem) wrote :

For example, the install guide doesn't say anything about running nova-manage commands here as root:

https://docs.openstack.org/nova/latest/install/controller-install-ubuntu.html#install-and-configure-components

Revision history for this message
Matt Riedemann (mriedem) wrote :

The beginning of that doc says:

"Source the admin credentials to gain access to admin-only CLI commands:

$ . admin-openrc"

How are you sourcing an admin rc file if you're not root? I guess your current non-root user is just part of a group that has access to that file?

Revision history for this message
Matt Riedemann (mriedem) wrote :

I'm trying to get some guidance in the mailing list:

http://lists.openstack.org/pipermail/openstack-dev/2018-April/129574.html

Marking as Opinion for now.

Changed in nova:
status: New → Opinion
importance: Undecided → Low
Revision history for this message
Leonardo Richero (lrichero) wrote :

Matt thanks for your answers.

I didn't know that 'nova-manage' and 'nova-status' were administrative level commands.

In the example used here: https://docs.openstack.org/nova/latest/install/controller-install-ubuntu.html#install-and-configure-components
I ran this command as root, because I had to run the previously 'su' commands as root.

But in this case: https://docs.openstack.org/nova/latest/install/verify.html I sourced the admin credentials whith a non-root user, so I tried to run the command 'nova-status upgrade check' also.

I wrote this suggestion change because I lost time to realize that I have to run it as root. And I wanted to colaborate.

But perhaps it is not necesary. Then I realize also that the prompts # and $ indicates when it should be run as a root or not.

So if you want to close this "bug" or "suggestion", is ok for me.

Leonardo.

Revision history for this message
Matt Riedemann (mriedem) wrote :

Based on the convention being followed in the docs, which was actually news to me, I think we should close this.

http://lists.openstack.org/pipermail/openstack-dev/2018-April/129580.html

Changed in nova:
status: Opinion → Invalid
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.