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

resolv-prepender fails on missing env file

XMLWordPrintable

    • None
    • False
    • Hide

      None

      Show
      None

      Description of problem:

      If resolv-prepender is triggered by the path unit before the dispatcher script has populated the env file it fails because the env file is mandatory. We should make it optional by using EnvironmentFile=-

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

      4.16

      How reproducible:

      
      $ systemctl cat on-prem-resolv-prepender.service
      # /etc/systemd/system/on-prem-resolv-prepender.service
      [Unit]
      Description=Populates resolv.conf according to on-prem IPI needs
      # Per https://issues.redhat.com/browse/OCPBUGS-27162 there is a problem if this is started before crio-wipe
      After=crio-wipe.service
      StartLimitIntervalSec=0
      [Service]
      Type=oneshot
      # Would prefer to do Restart=on-failure instead of this bash retry loop, but
      # the version of systemd we have right now doesn't support it. It should be
      # available in systemd v244 and higher.
      ExecStart=/bin/bash -c " \
        until \
        /usr/local/bin/resolv-prepender.sh; \
        do \
        sleep 10; \
        done"
      EnvironmentFile=/run/resolv-prepender/env
          
      $ systemctl cat crio-wipe.service
      No files found for crio-wipe.service.
          

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          

      Expected results:

          

      Additional info:

          

              bnemec@redhat.com Benjamin Nemec
              bnemec@redhat.com Benjamin Nemec
              Ross Brattain Ross Brattain
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated: