xenserver / xenserver-install-wizard

Post-install tools for setting up a xenserver system.
7 stars 10 forks source link

semantic code error in network.py print statement causes crash for static interfaces. #52

Closed lsearl closed 10 years ago

lsearl commented 10 years ago

The wrong number of arguments was given to the format string of an information print statement for statically configured interface. Six values were given to a format string that wanted 5.

Here is the patch that I use to resolve the issue:

diff -Nuar xenserver-install-wizard-0.2.28/network.py xenserver-install-wizard-0.2.28new/network.py
--- xenserver-install-wizard-0.2.28/network.py  2013-12-04 07:37:12.000000000 -0600
+++ xenserver-install-wizard-0.2.28new/network.py   2013-12-06 12:57:47.055206815 -0600
@@ -66,7 +66,7 @@
            if mode == "DHCP":
                print >> sys.stderr, "Configuring %s with DHCP" % device
            else:
-               print >> sys.stderr, "Configuring %s with static IP %s netmask %s gateway %s DNS %s" % (device, mode, address, netmask, gateway, dns)
+               print >> sys.stderr, "Configuring %s with static IP %s netmask %s gateway %s DNS %s" % (device, address, netmask, gateway, dns)
            x.xenapi.PIF.reconfigure_ip(config["device_to_pif"][device], mode, address, netmask, gateway, dns)
        if "management" in config:
            print >> sys.stderr, "Configuring %s as the management interface" % config["management"]
lsearl commented 10 years ago

Note that the above patch is for version 0.2.28.

djs55 commented 10 years ago

Fixed by #53