Playbook replay caused password regeneration - system returns: Authorization failed: Internal Server Error (HTTP 500)

Bug #1838805 reported by Chris Winnicki
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
High
Tee Ngo

Bug Description

Brief Description
-----------------
Playbook replay caused password regeneration - system returns: Authorization failed: Internal Server Error (HTTP 500)

[sysadmin@controller-0 ~(keystone_admin)]$ system --debug host-list
DEBUG (base:187) Making authentication request to http://[abde::2]:5000/v3/auth/tokens
DEBUG (connectionpool:207) Starting new HTTP connection (1): abde::2
DEBUG (connectionpool:395) http://abde::2:5000 "POST /v3/auth/tokens HTTP/1.1" 500 141
DEBUG (session:442) Request returned failure status: 500
Authorization failed: Internal Server Error (HTTP 500)
[sysadmin@controller-0 ~(keystone_admin)]$

2019-08-01 18:29:23.562 3671518 INFO barbican.cmd.keystone_listener [-] Booting up Barbican Keystone listener node...
2019-08-01 18:29:23.643 3671518 CRITICAL barbican [-] Unhandled error: BarbicanException: Error configuring registry database with supplied sql_connection. Got error: (psycopg2.OperationalError) FATAL: password authentication failed for user "admin-barbican"
2019-08-01 18:29:23.643 3671518 ERROR barbican Traceback (most recent call last):
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/bin/barbican-keystone-listener", line 10, in <module>
2019-08-01 18:29:23.643 3671518 ERROR barbican sys.exit(main())
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/usr/lib/python2.7/site-packages/barbican/cmd/keystone_listener.py", line 76, in main
2019-08-01 18:29:23.643 3671518 ERROR barbican keystone_listener.MessageServer(CONF),
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/usr/lib/python2.7/site-packages/barbican/queue/keystone_listener.py", line 153, in __init__
2019-08-01 18:29:23.643 3671518 ERROR barbican NotificationTask.__init__(self, conf)
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/usr/lib/python2.7/site-packages/barbican/queue/keystone_listener.py", line 45, in __init__
2019-08-01 18:29:23.643 3671518 ERROR barbican repositories.setup_database_engine_and_factory()
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/usr/lib/python2.7/site-packages/barbican/model/repositories.py", line 108, in setup_database_engine_and_factory
2019-08-01 18:29:23.643 3671518 ERROR barbican _ENGINE = _get_engine(_ENGINE)
2019-08-01 18:29:23.643 3671518 ERROR barbican File "/usr/lib/python2.7/site-packages/barbican/model/repositories.py", line 192, in _get_engine
2019-08-01 18:29:23.643 3671518 ERROR barbican raise exception.BarbicanException(msg)
2019-08-01 18:29:23.643 3671518 ERROR barbican BarbicanException: Error configuring registry database with supplied sql_connection. Got error: (psycopg2.OperationalError) FATAL: password authentication failed for user "admin-barbican"

/etc/sysinv/sysinv.conf
2019-08-02 17:58:10.497 1089187 ERROR sysinv.openstack.common.threadgroup [-] (psycopg2.OperationalError) FATAL: password authentication failed for user "admin-sysinv"
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup Traceback (most recent call last):
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/threadgroup.py", line 117, in wait
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup x.wait()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/threadgroup.py", line 49, in wait
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self.thread.wait()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 175, in wait
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self._exit_event.wait()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/event.py", line 121, in wait
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return hubs.get_hub().switch()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/hubs/hub.py", line 294, in switch
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self.greenlet.switch()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/greenthread.py", line 214, in main
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup result = function(*args, **kwargs)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/openstack/common/service.py", line 450, in run_service
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup service.start()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 180, in start
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup self._start()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 197, in _start
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup system = self._create_default_system()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/conductor/manager.py", line 240, in _create_default_system
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup system = self.dbapi.isystem_get_one()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/objects/__init__.py", line 102, in wrapper
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup result = fn(*args, **kwargs)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/db/sqlalchemy/api.py", line 1185, in isystem_get_one
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup query = model_query(models.isystem)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sysinv/db/sqlalchemy/api.py", line 132, in model_query
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup with _session_for_read() as session:
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self.gen.next()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 1042, in _transaction_scope
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup context=context) as resource:
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/contextlib.py", line 17, in __enter__
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self.gen.next()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 645, in _session
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup bind=self.connection, mode=self.mode)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 409, in _create_session
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup self._start()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 496, in _start
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup engine_args, maker_args)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/enginefacade.py", line 520, in _setup_for_connection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup sql_connection=sql_connection, **engine_kwargs)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/debtcollector/renames.py", line 43, in decorator
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return wrapped(*args, **kwargs)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 202, in create_engine
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup test_conn = _test_connection(engine, max_retries, retry_interval)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/engines.py", line 380, in _test_connection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return engine.connect()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2091, in connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self._connection_cls(self, **kwargs)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 90, in __init__
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup if connection is not None else engine.raw_connection()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2177, in raw_connection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup self.pool.unique_connection, _connection)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2151, in _wrap_pool_connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup e, dialect, self)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 1461, in _handle_dbapi_exception_noconnection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup util.raise_from_cause(newraise, exc_info)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup reraise(type(exception), exception, tb=exc_tb, cause=cause)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/base.py", line 2147, in _wrap_pool_connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return fn()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 328, in unique_connection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return _ConnectionFairy._checkout(self)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 766, in _checkout
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup fairy = _ConnectionRecord.checkout(pool)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 516, in checkout
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup rec = pool._do_get()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1138, in _do_get
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup self._dec_overflow()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 66, in __exit__
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup compat.reraise(exc_type, exc_value, exc_tb)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 1135, in _do_get
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self._create_connection()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 333, in _create_connection
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return _ConnectionRecord(self)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 461, in __init__
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup self.__connect(first_connect_check=True)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/pool.py", line 651, in __connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup connection = pool._invoke_creator(self)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 105, in connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return dialect.connect(*cargs, **cparams)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/sqlalchemy/engine/default.py", line 393, in connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup return self.dbapi.connect(*cargs, **cparams)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib64/python2.7/site-packages/psycopg2/__init__.py", line 164, in connect
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup conn = _connect(dsn, connection_factory=connection_factory, async=async)
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup File "/usr/lib/python2.7/site-packages/eventlet/support/psycopg2_patcher.py", line 46, in eventlet_wait_callback
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup state = conn.poll()
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup OperationalError: (psycopg2.OperationalError) FATAL: password authentication failed for user "admin-sysinv"
2019-08-02 17:58:10.497 1089187 TRACE sysinv.openstack.common.threadgroup

Severity
--------
Major

Steps to Reproduce
------------------
Install the following system:
(IPv6)
2 controlers
2 storage
4 workers

Expected Behavior
------------------
Replaying ansible-playbook /usr/share/ansible/stx-ansible/playbooks/bootstrap/bootstrap.yml
should not cause password regeneration

Actual Behavior
----------------
Replaying ansible-playbook /usr/share/ansible/stx-ansible/playbooks/bootstrap/bootstrap.yml
results in:

[sysadmin@controller-0 ~(keystone_admin)]$ system --debug host-list
DEBUG (base:187) Making authentication request to http://[abde::2]:5000/v3/auth/tokens
DEBUG (connectionpool:207) Starting new HTTP connection (1): abde::2
DEBUG (connectionpool:395) http://abde::2:5000 "POST /v3/auth/tokens HTTP/1.1" 500 141
DEBUG (session:442) Request returned failure status: 500
Authorization failed: Internal Server Error (HTTP 500)
[sysadmin@controller-0 ~(keystone_admin)]$

Reproducibility
---------------
100%

System Configuration
--------------------
(IPv6)
2 controlers
2 storage
4 workers

Wind River internal lab name: cgcs-wildcat-15-22.cumulus.wrs.com

Branch/Pull Time/Commit
-----------------------
###
### StarlingX
### Built from master
###

OS="centos"
SW_VERSION="19.01"
BUILD_TARGET="Host Installer"
BUILD_TYPE="Formal"
BUILD_ID="20190728T233000Z"

JOB="STX_build_master_master"
<email address hidden>"
BUILD_NUMBER="196"
BUILD_HOST="starlingx_mirror"
BUILD_DATE="2019-07-28 23:30:00 +0000"

Last Pass
---------
not known

Timestamp/Logs
--------------
Attached

Test Activity
-------------
Regression: Installation and Configuration

Revision history for this message
Chris Winnicki (chriswinnicki) wrote :
Revision history for this message
Frank Miller (sensfan22) wrote :

Marking as high priority since user cannot replay a playbook which is a requirement for ansible.

Changed in starlingx:
status: New → Triaged
importance: Undecided → High
tags: added: stx.2.0 stx.config
Changed in starlingx:
assignee: nobody → Tee Ngo (teewrs)
Revision history for this message
Tee Ngo (teewrs) wrote :

We have a specific check in the bootstrap playbook to skip password generation role in case of replay (replay = bootstrap puppet manifest has already been applied).

Might recent change to barbican have broken replay?

I won't be available to investigate this issue until Aug. 19th due to planned vacation.

Revision history for this message
Chris Winnicki (chriswinnicki) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)

Fix proposed to branch: master
Review: https://review.opendev.org/674472

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/674472
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=64b953ec3b44a9888979cb18788b9481cba9a133
Submitter: Zuul
Branch: master

commit 64b953ec3b44a9888979cb18788b9481cba9a133
Author: Tee Ngo <email address hidden>
Date: Sat Aug 3 07:52:53 2019 -0400

    Prevent admin password regeneration upon bootstrap replay

    Currently admin password is regenerated in bootstrap replay if
    the initial bootstrap failed for whatever reason. This results in
    Authorization failure after controller-0 unlock as the admin
    password, which got regenerated in the replay and stored via
    python keyring, no longer matches with the admin password postgres
    was bootstrapped with.

    In this commit, admin password is not regenerated in a replay after
    the bootstrap puppet manifest has been applied regardless of the
    initial bootstrap status.

    This logic will be revised once the decision has been made to
    continue storing the admin password using python keyring or to switch
    to barbican as the required changes to support password generation/
    regeneration in the bootstrap playbook differ considerably between
    the two storage methods. In the meantime, the user can always change
    the admin password at any time after the system is up (e.g. via
    Horizon).

    Closes-Bug: 1837696
    Closes-Bug: 1838805
    Change-Id: I672a7e97a9183f33732b3c979188c5db9b560296
    Signed-off by: Tee Ngo <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
Ghada Khalil (gkhalil) wrote :

@Tee, please cherrypick to the r/stx.2.0 branch

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (r/stx.2.0)

Fix proposed to branch: r/stx.2.0
Review: https://review.opendev.org/677506

Dariush Eslimi (deslimi)
tags: added: stx.retestneeded
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (r/stx.2.0)

Reviewed: https://review.opendev.org/677506
Committed: https://git.openstack.org/cgit/starlingx/ansible-playbooks/commit/?id=05f677d0993604a0b1a1e40b2d64f91c24c43c5c
Submitter: Zuul
Branch: r/stx.2.0

commit 05f677d0993604a0b1a1e40b2d64f91c24c43c5c
Author: Tee Ngo <email address hidden>
Date: Sat Aug 3 07:52:53 2019 -0400

    Prevent admin password regeneration upon bootstrap replay

    Currently admin password is regenerated in bootstrap replay if
    the initial bootstrap failed for whatever reason. This results in
    Authorization failure after controller-0 unlock as the admin
    password, which got regenerated in the replay and stored via
    python keyring, no longer matches with the admin password postgres
    was bootstrapped with.

    In this commit, admin password is not regenerated in a replay after
    the bootstrap puppet manifest has been applied regardless of the
    initial bootstrap status.

    This logic will be revised once the decision has been made to
    continue storing the admin password using python keyring or to switch
    to barbican as the required changes to support password generation/
    regeneration in the bootstrap playbook differ considerably between
    the two storage methods. In the meantime, the user can always change
    the admin password at any time after the system is up (e.g. via
    Horizon).

    Closes-Bug: 1837696
    Closes-Bug: 1838805
    Change-Id: I672a7e97a9183f33732b3c979188c5db9b560296
    Signed-off by: Tee Ngo <email address hidden>

Ghada Khalil (gkhalil)
tags: added: in-r-stx20
Revision history for this message
John Kruszewski (jiggernaut) wrote :
Download full text (5.5 KiB)

# Testing Status
PASSED

# Configuration
2 + 2 Controller Storage Config (IPv4)

# Load Tested
2019-09-12_20-00-00

# cp default to localhost for specific lab
localhost:~$ cp /usr/share/ansible/stx-ansible/playbooks/bootstrap/host_vars/default.yml localhost.yml

# Edit localhost.yml to specific lab config (oam IPs, admin and ansible pw)
localhost:~$ vi localhost.yml

# Initial successful run of the Ansible bootstrap playbook
localhost:~$ ansible-playbook /usr/share/ansible/stx-ansible/playbooks/bootstrap/bootstrap.yml
.....
TASK [bringup-essential-services : Mark the bootstrap as completed] ****************************************************************************
changed: [localhost]

PLAY RECAP *************************************************************************************************************************************
localhost : ok=212 changed=126 unreachable=0 failed=0

localhost:~$

# source and run command
localhost:~$ source /etc/platform/openrc
[sysadmin@localhost ~(keystone_admin)]$ system --debug host-list
DEBUG (base:187) Making authentication request to http://localhost:5000/v3/auth/tokens
DEBUG (connectionpool:207) Starting new HTTP connection (1): localhost
DEBUG (connectionpool:395) http://localhost:5000 "POST /v3/auth/tokens HTTP/1.1" 201 4568
DEBUG (base:192)
....
....
eated_at": "2019-09-19T15:12:49.584507+00:00", "subfunction_avail": "not-installed", "install_output": "text", "action": "none", "bm_type": null, "config_target": "6177350b-6251-4d93-a170-0afa8d64c1aa"}]}

+----+--------------+-------------+----------------+-------------+--------------+
| id | hostname | personality | administrative | operational | availability |
+----+--------------+-------------+----------------+-------------+--------------+
| 1 | controller-0 | controller | locked | disabled | online |
+----+--------------+-------------+----------------+-------------+--------------+
[sysadmin@localhost ~(keystone_admin)]$

############################
# re-run ansible as sysadmin
############################
[sysadmin@localhost ~(keystone_admin)]$ ansible-playbook /usr/share/ansible/stx-ansible/playbooks/bootstrap/bootstrap.yml

PLAY [all] ********************************************************************************************************************************************************************************
...
....
TASK [bringup-essential-services : Mark the bootstrap as completed] ***********************************************************************************************************************
changed: [localhost]

PLAY RECAP ********************************************************************************************************************************************************************************
localhost : ok=205 changed=88 unreachable=0 failed=0

[sysadmin@localhost ~(keystone_admin)]$

# re-run command - OK
[sysadmin@localhost ~(keystone_admin)]$ system --debug host-list
DEBUG (base:187) Making authentication request to http://localhost:5000/v3/auth/tokens
DEBUG (connectionpool:207) Starting new HTTP connection (1): localhost
....
....
-09-19T15:12:49.584507+0...

Read more...

tags: removed: stx.retestneeded
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.