Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-27398

Setting the advertiseAddress in the microshift config.yaml file leads to CrashLoopBackOff for the ovnkube-master pod

XMLWordPrintable

    • Low
    • No
    • 1
    • uShift Sprint 248
    • 1
    • False
    • Hide

      None

      Show
      None
    • Hide
      Previously, when the `advertiseAddress` was set explicitly in the MicroShift `config.yaml` to the expected default IP address value, but an IP address was not set for the `br-ex` network bridge on the host, the `ovnkube-master` container in the `ovnkube-master` pod crashed. This occurred because when the `advertiseAddress` key is set explicitly, MicroShift neither computes it, nor sets the IP address in any interface. Whenever `advertiseAddress` is configured with an IP address, any network interfaces must also be configured. With this release, the service verifies these settings and prints an error, if present, in the `microshift.service` journal. Specifically, MicroShift checks whether `advertiseAddress` is set, then checks whether any interface has the same address set. If no interface has the same `advertiseAddress` IP address set, MicroShift prints an error, for example, `Advertise address: %s not present in any interface, advertiseAddress` and fails. This helps ensure the proper configuration before the system starts.
      Show
      Previously, when the `advertiseAddress` was set explicitly in the MicroShift `config.yaml` to the expected default IP address value, but an IP address was not set for the `br-ex` network bridge on the host, the `ovnkube-master` container in the `ovnkube-master` pod crashed. This occurred because when the `advertiseAddress` key is set explicitly, MicroShift neither computes it, nor sets the IP address in any interface. Whenever `advertiseAddress` is configured with an IP address, any network interfaces must also be configured. With this release, the service verifies these settings and prints an error, if present, in the `microshift.service` journal. Specifically, MicroShift checks whether `advertiseAddress` is set, then checks whether any interface has the same address set. If no interface has the same `advertiseAddress` IP address set, MicroShift prints an error, for example, `Advertise address: %s not present in any interface, advertiseAddress` and fails. This helps ensure the proper configuration before the system starts.
    • Bug Fix
    • In Progress

      This is a clone of issue OCPBUGS-23336. The following is the description of the original issue:

      Description of problem:

      I tried to deploy Microshift and had an issue while setting up the config.yaml file. Specifically, I explicitly set the advertiseAddress to the default one, but didn't set the IP in the host interface, leading to a failure in one of the ovnkube-master's pod containers.In my case, I misread the documentation (the user is responsible for setting the IP in the host interface if the advertiseAddress is set). Deleting that key resolved the problem.However, since we [document the default address](https://access.redhat.com/documentation/en-us/red_hat_build_of_microshift/4.14/html/configuring/microshift-using-config-tools#microshift-config-yaml_microshift-configuring) in the config.yaml and having it set by the user prevents ovnkube from configuring the IP, could a validation beforehand better inform the users of the error and avoid them digging in the ovnkube logs?

      Version-Release number of selected component (if applicable):

      4.14

      How reproducible:

      Always

      Steps to Reproduce:

      1. Configure the host for microshift without setting an IP address for the br-ex interface
      2. Set an IP address in the advertiseAddress key explicitly (even the expected default one)
      3. systemctl start microshift.service
      

      Actual results:

      The ovnkube-master container in the ovnkube-master pod crashes

      Expected results:

      The failure is expected as we document that in the case an IP is set explicitly, microshift (1) does not compute it, (2) does not set the IP address in any interface.
      
      However, we also document the key in the example config.yaml file with the default value it will take (the first address of the subnet next to the services one). A user might set the same default address explicitly and expect it to work. The burden of deeping dive into the ovnkube logs could be uncomfortable. Rather, we could prevent the deploy from starting at all and fail at an early stage printing the error in the microshift.service's journal by:
      1. Looking if the advertiseAddress is set
      2. If set, verify that any interface has that address set
      3. If no interface has that address set, print a clearer error like "You set an advertiseAddress in the config.yaml file but it is not set in any interfaces" and fail.

      Additional info:

       

              pacevedo@redhat.com Pablo Acevedo Montserrat
              openshift-crt-jira-prow OpenShift Prow Bot
              Douglas Hensel Douglas Hensel
              Shauna Diaz Shauna Diaz
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: