Re-running openstack undercloud install fails on permissions for /etc/os-net-config/config.yaml

Bug #1970437 reported by Brent Eagles
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned

Bug Description

If you re-run "openstack undercloud install" on the undercloud, it fails when attempting to access /etc/os-net-config/config.yaml

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

I've triaged as 'high' because it may impact updates/upgrades.

Changed in tripleo:
milestone: none → zed-1
status: New → Triaged
importance: Undecided → Medium
importance: Medium → High
milestone: zed-1 → yoga-3
Revision history for this message
Rabi Mishra (rabi) wrote :
Revision history for this message
Sandeep Yadav (sandeepyadav93) wrote :

Hello,

I have also noticed this issue when re-running undercloud install(as normal user) in my environment.

~~~
zuul@undercloud ~]$ openstack undercloud install
Deprecated: Option "ipxe_deploy" from group "DEFAULT" is deprecated. Use option "ipxe_enabled" from group "DEFAULT".
Deprecated: Option "enable_nova" from group "DEFAULT" is deprecated for removal (Nova can no longer be enabled via the config settings.). Its value may be silently ignored in the future.
Deprecated: Option "enable_novajoin" from group "DEFAULT" is deprecated for removal (Support for the novajoin metadata service has been deprecated.). Its value may be silently ignored in the future.
Deprecated: Option "enable_heat" from group "DEFAULT" is deprecated for removal (Heat has been replaced by the heat-ephemeral service and this option has been deprecated.). Its value may be silently ignored in the future.
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.9/site-packages/tripleoclient/command.py", line 34, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.9/site-packages/osc_lib/command/command.py", line 39, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.9/site-packages/cliff/command.py", line 186, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/undercloud.py", line 154, in take_action
    cmd = undercloud_config.prepare_undercloud_deploy(
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/undercloud_config.py", line 799, in prepare_undercloud_deploy
    undercloud_preflight.check(verbose_level, upgrade, net_config_yaml)
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/undercloud_preflight.py", line 542, in check
    _validate_no_ip_change(net_config_yaml)
  File "/usr/lib/python3.9/site-packages/tripleoclient/v1/undercloud_preflight.py", line 307, in _validate_no_ip_change
    with open(os_net_config_file, 'r') as f:
PermissionError: [Errno 13] Permission denied: '/etc/os-net-config/config.yaml'
[Errno 13] Permission denied: '/etc/os-net-config/config.yaml'
~~~

Following are the permissions on this file:

~~~
-rw-------. 1 root root 399 Apr 27 05:20 /etc/os-net-config/config.yaml
~~~

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

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/839684
Committed: https://opendev.org/openstack/tripleo-ansible/commit/f06bc84cc08984ddc7029e6e91fd8fb6ebf21dfe
Submitter: "Zuul (22348)"
Branch: master

commit f06bc84cc08984ddc7029e6e91fd8fb6ebf21dfe
Author: rabi <email address hidden>
Date: Thu Apr 28 11:33:24 2022 +0530

    Change access permission of files in /etc/os-net-config

    Some of these files are used for validations on the undercloud,
    that are run as non-root user without sudo.

    Change-Id: I15f9cc771c754c257b795263b8d6c3e0d19fd46c
    Closes-Bug: #1970437

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-ansible (stable/wallaby)

Fix proposed to branch: stable/wallaby
Review: https://review.opendev.org/c/openstack/tripleo-ansible/+/840195

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-ansible (stable/wallaby)

Reviewed: https://review.opendev.org/c/openstack/tripleo-ansible/+/840195
Committed: https://opendev.org/openstack/tripleo-ansible/commit/41aeb2371ba1945774ee97c25245285a70beb280
Submitter: "Zuul (22348)"
Branch: stable/wallaby

commit 41aeb2371ba1945774ee97c25245285a70beb280
Author: rabi <email address hidden>
Date: Thu Apr 28 11:33:24 2022 +0530

    Change access permission of files in /etc/os-net-config

    Some of these files are used for validations on the undercloud,
    that are run as non-root user without sudo.

    Change-Id: I15f9cc771c754c257b795263b8d6c3e0d19fd46c
    Closes-Bug: #1970437
    (cherry picked from commit f06bc84cc08984ddc7029e6e91fd8fb6ebf21dfe)

tags: added: in-stable-wallaby
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-ansible 5.0.0

This issue was fixed in the openstack/tripleo-ansible 5.0.0 release.

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.