Newly configured DNS server is removed after both controllers rebooted

Bug #1989142 reported by Fabiano Correa Mercer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Fabiano Correa Mercer

Bug Description

Brief Description
-----------------
Added a dns nameserver using system commands (system dns-modify) in an AIO-DX env. The /etc/resolv.conf shows the updated nameserver entry but when both controllers are rebooted, the /etc/resolv.conf reverts the change.

Severity
--------
Major

Steps to Reproduce
------------------
 - system dns-modify nameservers=128.224.144.130,8.8.8.8
 - cat /etc/resolv.conf
 - sudo reboot controller-1 and sudo reboot controller-0 (at the same time in the given sequence)
 - system dns-show
 - cat /etc/resolv.conf

Expected Behavior
------------------
/etc/resolv.conf values should not be overridden

Actual Behavior
----------------
/etc/resolv.conf values are overridden

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

System Configuration
--------------------
AI0-DX

Branch/Pull Time/Commit
-----------------------
master/2022-09-06

Last Pass
---------
N/A

Timestamp/Logs
--------------
N/A

Test Activity
-------------
Developer Testing

Workaround
-----------
N/A

Changed in starlingx:
assignee: nobody → Fabiano Correa Mercer (fcorream)
Changed in starlingx:
status: New → In Progress
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.8.0 stx.config stx.networking
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-puppet (master)

Reviewed: https://review.opendev.org/c/starlingx/stx-puppet/+/856560
Committed: https://opendev.org/starlingx/stx-puppet/commit/751a93a89b59ac6955ea394bc6d2595676e693de
Submitter: "Zuul (22348)"
Branch: master

commit 751a93a89b59ac6955ea394bc6d2595676e693de
Author: Fabiano Mercer <email address hidden>
Date: Thu Sep 8 15:56:09 2022 -0300

    Create runtime class to update DNS resolv.conf

    It was detected the command 'system dns-modify' updates the
    resolv.conf correctly but after reboot the resolv.conf
    is overwritten with old values.
    The reason was the system.yaml was being updated but code
    was not calling script: puppet-manifest-apply.sh to update
    YAMLs in the path that puppet will use.
    Changed code to use puppet runtime class and the right
    function to update YAMLs and call puppet-manifest-apply.sh.

    Test Plan (DEBIAN: Standard CENTOS: AIO-DX):
    PASS Modify DNS and check resolv.conf in both controllers
    PASS Modify DNS and reboot both controllers
    PASS Install AIO-DX in VBox using ISO with this fix
    PASS Install Standard in VBox using ISO with this fix

    Partial-Bug: #1989142

    Signed-off-by: Fabiano Mercer <email address hidden>
    Change-Id: I3f98264a74371ce80ba7d1d41147e12424582d83

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to config (master)

Reviewed: https://review.opendev.org/c/starlingx/config/+/856562
Committed: https://opendev.org/starlingx/config/commit/4dce9dff96f32dfe2604e4615be1856d459a35cc
Submitter: "Zuul (22348)"
Branch: master

commit 4dce9dff96f32dfe2604e4615be1856d459a35cc
Author: Fabiano Mercer <email address hidden>
Date: Thu Sep 8 16:02:20 2022 -0300

    Use puppet runtime class to update DNS resolv.conf

    It was detected the command 'system dns-modify' updates the
    resolv.conf correctly but after reboot the resolv.conf
    is overwritten with old values.
    The reason was the system.yaml was being updated but code
    was not calling script: puppet-manifest-apply.sh to update
    YAMLs in the path that puppet will use.
    Changed code to use puppet runtime class and the right
    function to update YAMLs and call puppet-manifest-apply.sh.

    Test Plan (DEBIAN: Standard CENTOS: AIO-DX):
    PASS Modify DNS and check resolv.conf in both controllers
    PASS Modify DNS and reboot both controllers
    PASS Install AIO-DX in VBox using ISO with this fix
    PASS Install Standard in VBox using ISO with this fix

    Closes-Bug: #1989142

    Depends-On: https://review.opendev.org/c/starlingx/stx-puppet/+/856560

    Signed-off-by: Fabiano Mercer <email address hidden>
    Change-Id: Ic0b2790bc3a92526efd459e4103380461c541f0d

Changed in starlingx:
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.