On 08/23/2010 01:05 PM, Radek Vykydal wrote:
Still logging into /tmp/ifcfg.log, but now - standard format is used, - values of IfcfgFile are removed (only what would be written-out, that is __str__() output is kept) - it was only confusing, should be part of unit tests if anything - logging of some events is added (e.g. Network.write(), Network.update()) --- pyanaconda/gui.py | 6 ++- pyanaconda/network.py | 105 ++++++++++++++++++++++++------------------------- 2 files changed, 56 insertions(+), 55 deletions(-)
Attaching example of old and new log of the same scenario.
NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth1 == file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 HWADDR=00:0C:29:09:85:04 ONBOOT=no NM_CONTROLLED=no == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" == values for file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth0 == file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:0C:29:09:85:FA ONBOOT=yes BOOTPROTO=dhcp == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" == values for file /etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO="dhcp" DEVICE="eth0" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth1 == file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE=eth1 HWADDR=00:0C:29:09:85:04 ONBOOT=no NM_CONTROLLED=no == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" == values for file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth0 == file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 HWADDR=00:0C:29:09:85:FA ONBOOT=yes BOOTPROTO=dhcp == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" == values for file /etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO="dhcp" DEVICE="eth0" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" NetworkDevice written to /etc/sysconfig/network-scripts/ifcfg-eth1 == file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="yes" ONBOOT="no" == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="yes" ONBOOT="no" == values for file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="yes" ONBOOT="no" NetworkDevice written to /etc/sysconfig/network-scripts/ifcfg-eth0 == file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" == values for file /etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO="dhcp" DEVICE="eth0" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" ========== before nm-c-e run ===== /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" HWADDR=00:0C:29:09:85:04 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 ===== /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" ========== after nm-c-e run ===== /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes HWADDR=00:0C:29:09:85:04 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes ===== /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth1 == file /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes HWADDR=00:0C:29:09:85:04 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth1 DEVICE="eth1" BOOTPROTO="dhcp" DEFROUTE="yes" HWADDR="00:0C:29:09:85:04" IPV4_FAILURE_FATAL="yes" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" NAME="System eth1" NM_CONTROLLED="yes" ONBOOT="no" PEERDNS="yes" PEERROUTES="yes" TYPE="Ethernet" UUID="9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04" == values for file /etc/sysconfig/network-scripts/ifcfg-eth1 BOOTPROTO="dhcp" DEFROUTE="yes" DEVICE="eth1" HWADDR="00:0C:29:09:85:04" IPV4_FAILURE_FATAL="yes" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" NAME="System eth1" NM_CONTROLLED="yes" ONBOOT="no" PEERDNS="yes" PEERROUTES="yes" TYPE="Ethernet" UUID="9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04" NetworkDevice read from /etc/sysconfig/network-scripts/ifcfg-eth0 == file /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" == file to be written for /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" == values for file /etc/sysconfig/network-scripts/ifcfg-eth0 BOOTPROTO="dhcp" DEVICE="eth0" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes"
12:38:06,838 DEBUG : Network.update() called 12:38:06,848 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE=eth1 HWADDR=00:0C:29:09:85:04 ONBOOT=no NM_CONTROLLED=no 12:38:06,849 DEBUG : NetworkDevice eth1: 12:38:06,849 DEBUG : loadIfcfgFile eth1 from /etc/sysconfig/network-scripts/ifcfg-eth1 12:38:06,849 DEBUG : NetworkDevice eth1: DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" 12:38:06,863 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 HWADDR=00:0C:29:09:85:FA ONBOOT=yes BOOTPROTO=dhcp 12:38:06,863 DEBUG : NetworkDevice eth0: 12:38:06,864 DEBUG : loadIfcfgFile eth0 from /etc/sysconfig/network-scripts/ifcfg-eth0 12:38:06,864 DEBUG : NetworkDevice eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" 12:38:06,887 DEBUG : NetworkDevice eth1 set: NM_CONTROLLED=yes 12:38:06,888 DEBUG : NetworkDevice eth0 set: NM_CONTROLLED=yes 12:38:06,904 DEBUG : Network.update() called 12:38:06,913 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE=eth1 HWADDR=00:0C:29:09:85:04 ONBOOT=no NM_CONTROLLED=no 12:38:06,913 DEBUG : NetworkDevice eth1: 12:38:06,914 DEBUG : loadIfcfgFile eth1 from /etc/sysconfig/network-scripts/ifcfg-eth1 12:38:06,914 DEBUG : NetworkDevice eth1: DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="no" ONBOOT="no" 12:38:06,924 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 HWADDR=00:0C:29:09:85:FA ONBOOT=yes BOOTPROTO=dhcp 12:38:06,925 DEBUG : NetworkDevice eth0: 12:38:06,925 DEBUG : loadIfcfgFile eth0 from /etc/sysconfig/network-scripts/ifcfg-eth0 12:38:06,926 DEBUG : NetworkDevice eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" ONBOOT="yes" 12:38:06,948 DEBUG : NetworkDevice eth1 set: NM_CONTROLLED=yes 12:38:06,949 DEBUG : NetworkDevice eth0 set: NM_CONTROLLED=yes 12:38:24,704 DEBUG : NetworkDevice eth1 set: NM_CONTROLLED=yes 12:38:24,704 DEBUG : NetworkDevice eth0 set: NM_CONTROLLED=yes 12:38:24,705 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE=eth1 HWADDR=00:0C:29:09:85:04 ONBOOT=no NM_CONTROLLED=no 12:38:24,705 DEBUG : NetworkDevice eth1: DEVICE="eth1" HWADDR="00:0C:29:09:85:04" NM_CONTROLLED="yes" ONBOOT="no" 12:38:24,706 DEBUG : writeIfcfgFile eth1 to /etc/sysconfig/network-scripts/ifcfg-eth1 not needed 12:38:24,710 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE=eth0 HWADDR=00:0C:29:09:85:FA ONBOOT=yes BOOTPROTO=dhcp 12:38:24,710 DEBUG : NetworkDevice eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:24,710 DEBUG : writeIfcfgFile eth0 to /etc/sysconfig/network-scripts/ifcfg-eth0 not needed 12:38:25,593 DEBUG : Dump before nm-c-e (can race with ifcfg updating). /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" HWADDR=00:0C:29:09:85:04 TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes PEERDNS=yes PEERROUTES=yes IPV4_FAILURE_FATAL=yes IPV6INIT=no NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 12:38:25,594 DEBUG : Dump before nm-c-e (can race with ifcfg updating). /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,360 DEBUG : Dump after nm-c-e. /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes HWADDR=00:0C:29:09:85:04 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes 12:38:52,361 DEBUG : Dump after nm-c-e. /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,361 DEBUG : Network.update() called 12:38:52,375 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes HWADDR=00:0C:29:09:85:04 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes 12:38:52,376 DEBUG : NetworkDevice eth1: 12:38:52,376 DEBUG : loadIfcfgFile eth1 from /etc/sysconfig/network-scripts/ifcfg-eth1 12:38:52,377 DEBUG : NetworkDevice eth1: DEVICE="eth1" BOOTPROTO="dhcp" DEFROUTE="yes" HWADDR="00:0C:29:09:85:04" IPV4_FAILURE_FATAL="yes" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" NAME="System eth1" NM_CONTROLLED="yes" ONBOOT="no" PEERDNS="yes" PEERROUTES="yes" TYPE="Ethernet" UUID="9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04" 12:38:52,388 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,388 DEBUG : NetworkDevice eth0: 12:38:52,388 DEBUG : loadIfcfgFile eth0 from /etc/sysconfig/network-scripts/ifcfg-eth0 12:38:52,389 DEBUG : NetworkDevice eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,396 DEBUG : Network.write() called 12:38:52,396 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth1: DEVICE="eth1" NM_CONTROLLED="yes" ONBOOT="no" TYPE=Ethernet BOOTPROTO=dhcp DEFROUTE=yes IPV4_FAILURE_FATAL=yes IPV6INIT=yes NAME="System eth1" UUID=9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04 IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=yes HWADDR=00:0C:29:09:85:04 PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes 12:38:52,397 DEBUG : NetworkDevice eth1: DEVICE="eth1" BOOTPROTO="dhcp" DEFROUTE="yes" HWADDR="00:0C:29:09:85:04" IPV4_FAILURE_FATAL="yes" IPV6INIT="yes" IPV6_AUTOCONF="yes" IPV6_DEFROUTE="yes" IPV6_FAILURE_FATAL="yes" IPV6_PEERDNS="yes" IPV6_PEERROUTES="yes" NAME="System eth1" NM_CONTROLLED="yes" ONBOOT="no" PEERDNS="yes" PEERROUTES="yes" TYPE="Ethernet" UUID="9c92fad9-6ecb-3e6c-eb4d-8a47c6f50c04" 12:38:52,397 DEBUG : writeIfcfgFile eth1 to /etc/sysconfig/network-scripts/ifcfg-eth1 not needed 12:38:52,398 DEBUG : /etc/sysconfig/network-scripts/ifcfg-eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,398 DEBUG : NetworkDevice eth0: DEVICE="eth0" BOOTPROTO="dhcp" HWADDR="00:0C:29:09:85:FA" NM_CONTROLLED="yes" ONBOOT="yes" 12:38:52,398 DEBUG : writeIfcfgFile eth0 to /etc/sysconfig/network-scripts/ifcfg-eth0 not needed
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list