Uploaded image for project: 'openATTIC'
  1. openATTIC
  2. OP-596

"oaconfig install" crashes when no default route is present




      Observed on a test system with local networking only:

      $ ifconfig eth0
      eth0      Link encap:Ethernet  HWaddr 08:00:27:38:b1:10  
                inet addr:  Bcast:  Mask:
                inet6 addr: fe80::a00:27ff:fe38:b110/64 Scope:Link
                UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
                RX packets:14298 errors:0 dropped:0 overruns:0 frame:0
                TX packets:7690 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:1000 
                RX bytes:20409236 (20.4 MB)  TX bytes:567196 (567.1 KB)
      $ route -n
      Kernel IP routing table
      Destination     Gateway         Genmask         Flags Metric Ref    Use Iface   U     1      0        0 eth0
      $ sudo oaconfig install
       * Stopping openATTIC systemd                                            [ OK ] 
       * Starting openATTIC systemd                                            [ OK ] 
       * Stopping openATTIC rpcd                                               [ OK ] 
       * Starting openATTIC rpcd                                               [ OK ] 
       * Reloading web server apache2                                                  * 
      Creating tables ...
      Creating table auth_permission
      Creating table auth_group_permissions
      Creating table auth_group
      Creating table auth_user_groups
      Creating table auth_user_user_permissions
      Creating table auth_user
      Creating table django_content_type
      Creating table django_session
      Creating table django_site
      Creating table django_admin_log
      Creating table authtoken_token
      Creating table ifconfig_host
      Creating table ifconfig_hostgroup_hosts
      Creating table ifconfig_hostgroup
      Creating table ifconfig_netdevice_brports
      Creating table ifconfig_netdevice_slaves
      Creating table ifconfig_netdevice
      Creating table ifconfig_ipaddress
      Creating table userprefs_userprofile
      Creating table userprefs_userpreference
      Creating table cmdlog_logentry
      Creating table peering_peerhost
      Creating table rpcd_apikey
      Creating table sysutils_initscript
      Creating table cron_cronjob
      Creating table btrfs_btrfs
      Creating table btrfs_btrfssubvolume
      Creating table lvm_volumegroup
      Creating table lvm_logicalvolume
      Creating table lvm_lvmetadata
      Creating table lvm_lvsnapshotjob
      Creating table lvm_snapshotconf
      Creating table lvm_logicalvolumeconf
      Creating table volumes_storageobject
      Creating table volumes_volumepool
      Creating table volumes_blockvolume
      Creating table volumes_filesystemvolume
      Creating table volumes_physicalblockdevice
      Creating table volumes_filesystemprovider
      Creating table volumes_diskdevice
      Creating table volumes_genericdisk
      Creating table nagios_command
      Creating table nagios_graph
      Creating table nagios_service
      Creating table http_export
      Creating table lio_initiator
      Creating table lio_portal
      Creating table lio_hostacl_portals
      Creating table lio_hostacl
      Creating table nfs_export
      Creating table samba_share
      Installing custom SQL ...
      Installing indexes ...
      Installed 70 object(s) from 2 fixture(s)
       * Stopping openATTIC systemd                                            [ OK ] 
       * Starting openATTIC systemd                                            [ OK ] 
       * Stopping openATTIC rpcd                                               [ OK ] 
       * Starting openATTIC rpcd                                               [ OK ] 
       * Reloading web server apache2                                                  * 
      Created default user "openattic" with password "openattic".
       * Starting Nagios Performance C Daemon (PNP4Nagios) npcd                [ OK ] 
       * Restarting nagios3 monitoring daemon nagios3                                 
                                                                               [ OK ]
      Waiting for status.dat to appear... done.
      Traceback (most recent call last):
        File "manage.py", line 26, in <module>
        File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 399, in execute_from_command_line
        File "/usr/lib/python2.7/dist-packages/django/core/management/__init__.py", line 392, in execute
        File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 242, in run_from_argv
          self.execute(*args, **options.__dict__)
        File "/usr/lib/python2.7/dist-packages/django/core/management/base.py", line 285, in execute
          output = self.handle(*args, **options)
        File "/usr/share/openattic/sysutils/management/commands/post_install.py", line 49, in handle
        File "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line 185, in send
          response = receiver(signal=self, sender=sender, **named)
        File "/usr/share/openattic/ifconfig/management/__init__.py", line 54, in create_interfaces
          defaultgw = get_default_gateway_linux()
        File "/usr/share/openattic/ifconfig/management/__init__.py", line 40, in get_default_gateway_linux
          raise SystemError("default gw not found")
      SystemError: default gw not found

      Agreed, this is an unusual setup. But oaconfig should handle this gracefully instead of bailing out with an error.


          Issue Links



              lgrimmer Grimmer, Lenz
              0 Vote for this issue
              2 Start watching this issue