1. 12 May, 2016 4 commits
  2. 06 May, 2016 1 commit
    • Scott Moser's avatar
      fix timestamp in reporting events. · 690bdce9
      Scott Moser authored
      If no timestamp was passed into a ReportingEvent, then the default was
      used.  That default was 'time.time()' which was evaluated once only at
      import time.
  3. 29 Apr, 2016 3 commits
  4. 28 Apr, 2016 2 commits
  5. 27 Apr, 2016 1 commit
    • Robert Jennings's avatar
      Ensure instance path is a child of cloud_dir · 7b65c24f
      Robert Jennings authored
      A cloud has an instance-id metadata value in the form:
      The leading '/' causes /var/lib/cloud/instance to link to
      /Compute-$TENANT/$CLOUDUSERNAME/$UUID rather than
      This patch strips the leading path separator from the instance-id.
      LP: #1575938
  6. 15 Apr, 2016 8 commits
    • Scott Moser's avatar
      network: do not write interface as 'auto' from ip= on command line. · b029dcef
      Scott Moser authored
      When ip= on the kernel command line defines the networking, set
      those network devices to be manually controlled, instead of 'auto'.
      The reason for this is that if they're marked as 'auto':
       a.) a second attempt will be made to ifup them.
       b.) they'll be brought down on shutdown
      'b' is problematic on network root filesystem.
      Also this picks up 2 changes from curtin's net module:
        - Cleanup newline logic so we always have a clean '\n\n' between stanza
        - Add a unittest to validate bonding network config render, specifically
          when to emit auto $iface for dependent bond slaves.
      LP: #1568637
    • Scott Moser's avatar
      write 'allow-hotplug', but 'auto' for auto. · 8384076e
      Scott Moser authored
    • Scott Moser's avatar
      support and render control=manual on initramfs network devices · 5039a080
      Scott Moser authored
      when reading the initramfs configurewd devices and turning them
      into network config, we change to not have 'auto' control (or allow=auto).
      The reason for this is that if the device was still up:
       a.) it would try to bring it up again (due to bug 1570142)
       b.) it would be brought down.
      'b' is problematic if there is an iscsi or network root filesystem.
      Note, that ifupdown does now support 'no-auto-down' which means
      that the nic should not be brought down on 'ifdown -a'.
      LP: #1568637
    • Scott Moser's avatar
      sync with curtin on render_interfaces · 14053fc7
      Scott Moser authored
      This picks up newline cleanup and some bond fixes from curtin at rev 374.
      - Cleanup newline logic so we always have a clean '\n\n' between stanza
      - Add a unittest to validate bonding network config render, specifically
        when to emit auto $iface for dependent bond slaves.
    • Scott Moser's avatar
      apply networking less often · 53f03512
      Scott Moser authored
      Do not apply networking configuration whenever a previous datasource
      has been loaded from disk and found to be valid (via positive
       return 'check_instance_id' or user configuration of manual_cache_clean).
      This effectively means that we apply fallback networking only once
      per instance rather than every boot on any datasource with
      'check_instance_id' implemented.
      LP: #1571004
    • Scott Moser's avatar
      log that you're not applying config · 53931ee1
      Scott Moser authored
    • Scott Moser's avatar
      only apply networking once per instance · 79b59658
      Scott Moser authored
      This attempts to only apply the networking once per instance
      by doing so only if the datasource was restored from disk.
      This will work by default for datasources with a functioning
      check_instance_id or if the user has set manual_cache_clean to true.
    • Scott Moser's avatar
      networking: no longer delete eth0.cfg on debian/ubuntu · f7d6eaef
      Scott Moser authored
      Ubuntu cloud images in created a file during build that
      would interfere with cloud-init's discovered or rendered networking.
      To avoid the issues, cloud-init was deleting
      /etc/network/interfaces.d/eth0.cfg .
      The build process no longer creates this file.
      However, to address any existing files cloud-init will still remove
      the file if it has known content and warn otherwise.
      LP: #1563487
  7. 14 Apr, 2016 1 commit
  8. 13 Apr, 2016 3 commits
    • Scott Moser's avatar
      phone_home: allow usage of fqdn · a551cb08
      Scott Moser authored
      This simply allows the phone_home template to pass the systems fully
      qualified domain name.
      LP: #1566824
    • Scott Moser's avatar
      chef: straighten out validation_cert and validation_key · ac50733f
      Scott Moser authored
      Now, validation_key is always a path to a file, as it is in
      chef's client.rb syntax.
      validation_cert is always the *content* of that file that should
      be written. However, if validation_cert is the string "system",
      then we do not write that value, but rather assume the file exists.
      LP: #1568940
    • Scott Moser's avatar
      skip bridges when generating fallback networking · 96cc3852
      Scott Moser authored
      It does not make sense to consider bridges when searching for fallback
      networking.  If the system is configured with a bridge, then its probably
      for some purpose other than to get to a metadata service.
      Considering the bridge could make cloud-init pick the wrong device on reboot.
      LP: #1569974
  9. 12 Apr, 2016 5 commits
  10. 11 Apr, 2016 6 commits
  11. 06 Apr, 2016 6 commits
    • Scott Moser's avatar
      Ensure that a resolve conf object is written as a string. · 822ac18b
      Scott Moser authored
      Instead of passing the raw object and expecting the write_file to work
      automatically make sure we explicitly pass the string version of it so
      that the write_file routine can correctly encode/decode it as needed.
      LP: #1479988
    • Scott Moser's avatar
      fix tests and hopefully actually work · 578fed15
      Scott Moser authored
    • Scott Moser's avatar
      rh_subscription: only check subscription if configured · eb5a4dda
      Scott Moser authored
      The rh_subscription config module would attempt to connect to the RHN servers
      even when no config is provided.
      Now, instead check to make sure that valid config is provided first.
      That consists of username and password or a activation key.
      LP: #1536706
    • Scott Moser's avatar
      fix adding of users when no group is specified · d75a912f
      Scott Moser authored
      revision 1179 regressed adding a user that did not have a 'groups'
      entry present in cloud-config.
      This handles that correctly, making 'add_user' able to take:
        a.) groups="group1,group2"
        b.) groups=["group1", "group2"]
        c.) groups=None
        d.) no groups parameter
      Additionally, if a primary group is specified it will also be created.
      End result is that this is functional:
       groups: ["sudo"]
         - name: sysop
           primary-group: sysop
           groups: "sudo,adm"
           shell: /bin/bash
         - name: user1
           primary-group: users
           groups: sudo
         - name: foo1
         - name: bar
           gecos: Bar
           groups: ["bargroup"]
      Resulting in:
       $ groups sysop
       sysop : sysop adm sudo
       $ groups user1
       user1 : users sudo
       $ groups foo1
       foo1 : foo1
       $ groups bar
       bar : bar bargroup
      LP: #1562918
    • Scott Moser's avatar
      support adding the primary group also · 2c95e4cf
      Scott Moser authored
    • Scott Moser's avatar
      write_files: fix decompression of content · 6a660b49
      Scott Moser authored
      When provided with gzipped data, an exception would be raised
      because of a conversion to string.
      This fixes the issue and adds a test for write_files.
      LP: #1565638