1. 17 Dec, 2019 2 commits
    • Łukasz Nowak's avatar
      format: Stabilise partition addresses · affe90a0
      Łukasz Nowak authored
      Depending on the netifaces version the netmask can come with or without
      lenght prefix, so support both cases and consider netmask with prefix
      as equal to without prefix.
      
      The only result will be update of the netmask in the computer XML file.
      affe90a0
    • Łukasz Nowak's avatar
      format: Try hard to keep the same computer address · d3c516ed
      Łukasz Nowak authored
      self.interface.getGlobalScopeAddressList which uses netifaces can have
      different sorting of the addresses depending of the version, so prefer the
      already configured IPv6 address.
      d3c516ed
  2. 28 Nov, 2019 1 commit
  3. 21 Nov, 2019 1 commit
    • Nicolas Wavrant's avatar
      format: support newer versions of netifaces · f2798c25
      Nicolas Wavrant authored
      fix the following crash in command ```slapos node boot``` in slapos package version "1.5.2+1.0.125+3-1" :
      
      ```
      # slapos node boot
      [BOOT] Checking if 'lo' has IPv6...
      [BOOT] Invoking ipv6 ping to slap.vifib.com...
      [BOOT] IPv6 network reachable...
      [BOOT] Invoking slapos node format...
      2019-11-20 09:43:52 slapos[5511] WARNING Creating new computer data with id 'COMP-3121'
      2019-11-20 09:43:52 slapos[5511] INFO Adding 10 new partitions
      2019-11-20 09:43:52 slapos[5511] INFO Updating computer
      2019-11-20 09:43:52 slapos[5511] ERROR u'ffff:ffff:ffff:ffff:ffff:ffff::/96' is not a valid IPv6 address string!
      Traceback (most recent call last):
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/cli/entry.py", line 300, in run_subcommand
          result = cmd.run(parsed_args)
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/cli/command.py", line 50, in run
          return self.take_action(parsed_args)
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/cli/format.py", line 128, in take_action
          do_format(conf=conf)
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/format.py", line 1401, in do_format
          use_unique_local_address_block=conf.use_unique_local_address_block)
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/format.py", line 665, in format
          partition.address_list.append(self.interface.addIPv6Address())
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/format.py", line 1227, in addIPv6Address
          if self._addSystemAddress(addr, netmask, tap=tap):
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/format.py", line 1058, in _addSystemAddress
          address_string = '%s/%s' % (address, netmaskToPrefixIPv6(netmask))
        File "/opt/slapos/eggs/slapos.core-1.5.2-py2.7.egg/slapos/format.py", line 179, in netmaskToPrefixIPv6
          netaddr.strategy.ipv6.str_to_int(netmask)]
        File "/opt/slapos/eggs/netaddr-0.7.19-py2.7.egg/netaddr/strategy/ipv6.py", line 142, in str_to_int
          raise AddrFormatError('%r is not a valid IPv6 address string!' % addr)
      AddrFormatError: u'ffff:ffff:ffff:ffff:ffff:ffff::/96' is not a valid IPv6 address string!
      [BOOT] [ERROR] Fail to format, try again in 15 seconds...
      [BOOT] Invoking slapos node format...
      ```
      
      /reviewed-on !157
      f2798c25
  4. 04 Jun, 2019 1 commit
  5. 11 Apr, 2019 1 commit
  6. 05 Apr, 2019 1 commit
  7. 19 Mar, 2019 1 commit
  8. 06 Mar, 2019 1 commit
    • Thomas Gambier's avatar
      [slapformat] Make sure routing is OK withVM inside VM · 9b3ccfd0
      Thomas Gambier authored
      if we have host2 inside host1 inside host0 then routing from host0 to host2 needs to specify 'via' address because the destination address (of host2) is not directly seen through slaptap of host0 (because it goes only to host1).
      
      this commit introduces a new constraint: users must now put the IPv6 address `network::1` on their ethernet interface inside the VM.
      
      /cc @jm @rafael @alain.takoudjou
      
      /reviewed-on !102
      9b3ccfd0
  9. 14 Jan, 2019 1 commit
    • Alain Takoudjou's avatar
      format: dump partition resources information if not exists yet · 69883b4b
      Alain Takoudjou authored
      If there is not changes in slapformat.xml, current slapformat will not dump computer
      resources (as well as partition resources).
      
      For compatibility with olders version of slapformat, dump partition resources
      if it's not created yet event if the file slapformat.xml didn't change.
      
      /reviewed-on !88
      69883b4b
  10. 07 Jan, 2019 1 commit
  11. 02 Jan, 2019 1 commit
    • Thomas Gambier's avatar
      Make IPv6 on tap optionnal and put only 1 IPv6 address on the tap itself. · 40ee3280
      Thomas Gambier authored
      tap_ipv6 option let you chose if you want IPv6 on the taps or not. Some
      customers may decide to have only IPv4 inside their VMs.
      
      We put only 1 address on the tap itself (e.g.
      2001:67c:1254:e:89:69b0:ffff:ffff/128 instead of
      2001:67c:1254:e:89:69b0:ffff:ffff/96) otherwise, when we assign the
      address 2001:67c:1254:e:89:69b0::/96 inside the VM, the address has
      "dadfailed" status (dad = "Duplicate Address Detection"). The problem
      appears only with address "0" (ending in ::) but not with others
      addresses. We had 2 solutions:
       * put only one address on the tap (the solution we choose)
       * forbid address "0" inside the VM
      
      The chosen solution has the advantage that the host machine won't
      answer the ping on behalf of the VM since the tap has only 1 address
      (its own).
      
      /cc @alain.takoudjou
      
      /reviewed-on !86
      40ee3280
  12. 14 Dec, 2018 2 commits
  13. 11 Dec, 2018 1 commit
  14. 03 Dec, 2018 1 commit
    • Thomas Gambier's avatar
      BUGFIX: fix c931d60c · 3b8cf767
      Thomas Gambier authored
      After c931d60c, default options were changed and we didn't want that.
      
      Rewrite the code so that we have a clearer scheme:
       * all options of format are listed as FormatConfig attributes with default values
       * all values present in configuration file (.cfg) erase the previous options
       * all values present in command line erase the previous options
      
      We use the special default argparse.SUPPRESS that removes totally the arg from arg dict so that only PRESENT options erase something
      3b8cf767
  15. 26 Nov, 2018 3 commits
  16. 14 Nov, 2018 1 commit
  17. 20 Sep, 2018 1 commit
  18. 05 Jul, 2018 1 commit
  19. 16 Apr, 2018 1 commit
  20. 12 Oct, 2017 1 commit
  21. 24 Sep, 2017 2 commits
  22. 13 Jun, 2017 10 commits
  23. 06 Jun, 2017 1 commit
  24. 22 May, 2017 1 commit
  25. 11 May, 2017 1 commit
  26. 10 Oct, 2016 1 commit