Uploaded image for project: 'XenServer Org'
  1. XenServer Org
  2. XSO-616

setup-vif-rules fails to run on interface unplug

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • None
    • 7.0, 7.1
    • Networking
    • None
    • Xenserver 7 running on HP Blade G8

    Description

      Using bridge as network backend and with locking mode locked, the unplug process fails with this error:

      Sep 14 09:26:52 xen0005 scripts-vif: Failed to setup-vif-rules classic vif58.0 ca50e046-b39b-51fd-7658-f89ccc794b09 0 clear

      With debug enabled on udev i found this error:

      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) 'xenstore-rm: could not remove path backend/vif/58/0/hotplug-status'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) 'xenstore-rm: could not remove path /xapi/ca50e046-b39b-51fd-7658-f89ccc794b09/hotplug/58/vif/0/hotplug'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) 'Traceback (most recent call last):'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' File "/usr/libexec/xenopsd/setup-vif-rules", line 252, in <module>'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' network_mode = get_host_network_mode (domuuid, devid)'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' File "/usr/libexec/xenopsd/setup-vif-rules", line 41, in get_host_network_mode'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' i = common.Interface(domuuid, devid)'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' File "/usr/libexec/xenopsd/common.py", line 215, in _init_'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' self.vif = VIF(uuid, int(devid))'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' File "/usr/libexec/xenopsd/common.py", line 136, in _init_'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) ' f = open("%s/VM/%s/vif.%d" % (xenops_path, vm_uuid, devid))'
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) 'IOError: '
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif'(err) '[Errno 2] No such file or directory: '/var/run/nonpersistent/xenopsd/classic/VM/ca50e046-b39b-51fd-7658-f89ccc794b09/vif.0''
      Sep 14 09:26:52 xen0005 systemd-udevd[23040]: '/usr/libexec/xenopsd/vif remove type_if=vif' [23117] exit with return code 0

      This is caused because the temporary file used for xenopsd (/var/run/nonpersistent/xenopsd/classic/VM/ca50e046-b39b-51fd-7658-f89ccc794b09/vif.0) is deleted before udev runs

      I changed the file:

      /usr/libexec/xenopsd/common.py

      To this:

      135 try:
      136 f = open("%s/VM/%s/vif.%d" % (xenops_path, vm_uuid, devid))
      137 self.json = json.loads(f.read())
      138 f.close()
      139 except:
      140 pass

      And everything working fine right now.

      Attachments

        Activity

          People

            allanr Allan Reid
            wgrcunha Francisco Freire
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: