~ubuntu-branches/ubuntu/saucy/cloud-init/saucy-proposed

« back to all changes in this revision

Viewing changes to cloudinit/sources/DataSourceAzure.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-08-14 21:44:22 UTC
  • mfrom: (1.4.1)
  • Revision ID: package-import@ubuntu.com-20130814214422-uzrq82t5srz2g4c2
Tags: 0.7.3~bzr858-0ubuntu1
* New upstream snapshot.
  * fix resizing of root partition by preferring the functional 'growpart'
    support over the broken 'parted resizepart' support (LP: #1212444)
  * add options for apt_ftp_proxy, apt_https_proxy and apt_config
    (LP: #1057195)

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
            bname = pk['fingerprint'] + ".crt"
139
139
            fp_files += [os.path.join(mycfg['data_dir'], bname)]
140
140
 
141
 
        start = time.time()
142
 
        missing = wait_for_files(wait_for + fp_files)
 
141
        missing = util.log_time(logfunc=LOG.debug, msg="waiting for files",
 
142
                                func=wait_for_files,
 
143
                                args=(wait_for + fp_files,))
143
144
        if len(missing):
144
145
            LOG.warn("Did not find files, but going on: %s", missing)
145
 
        else:
146
 
            LOG.debug("waited %.3f seconds for %d files to appear",
147
 
                      time.time() - start, len(wait_for))
148
146
 
149
147
        if shcfgxml in missing:
150
148
            LOG.warn("SharedConfig.xml missing, using static instance-id")
206
204
        command = BOUNCE_COMMAND
207
205
 
208
206
    LOG.debug("pubhname: publishing hostname [%s]", msg)
209
 
    start = time.time()
210
207
    shell = not isinstance(command, (list, tuple))
211
208
    # capture=False, see comments in bug 1202758 and bug 1206164.
212
 
    (output, err) = util.subp(command, shell=shell, capture=False, env=env)
213
 
    LOG.debug("publishing hostname took %.3f seconds", time.time() - start)
 
209
    util.log_time(logfunc=LOG.debug, msg="publishing hostname",
 
210
        get_uptime=True, func=util.subp,
 
211
        kwargs={'command': command, 'shell': shell, 'capture': False,
 
212
                'env': env})
214
213
 
215
214
 
216
215
def crtfile_to_pubkey(fname):