← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1948450] [NEW] cloud-init analize fails miserably if there is no log file

 

Public bug reported:

[root@demo3-node1 ~]# cloud-init analyze show
Traceback (most recent call last):
  File "/usr/bin/cloud-init", line 9, in <module>
    load_entry_point('cloud-init==18.2', 'console_scripts', 'cloud-init')()
  File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 882, in main
    get_uptime=True, func=functor, args=(name, args))
  File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2388, in log_time
    ret = func(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/cloudinit/analyze/__main__.py", line 102, in analyze_show
    (infh, outfh) = configure_io(args)
  File "/usr/lib/python2.7/site-packages/cloudinit/analyze/__main__.py", line 134, in configure_io
    infh = open(args.infile, 'r')
IOError: [Errno 2] No such file or directory: '/var/log/cloud-init.log'


I think it should fail more gracefully. This is:

[root@demo3-node1 ~]# cloud-init --version
/usr/bin/cloud-init 18.2

** Affects: cloud-init
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1948450

Title:
  cloud-init analize fails miserably if there is no log file

Status in cloud-init:
  New

Bug description:
  [root@demo3-node1 ~]# cloud-init analyze show
  Traceback (most recent call last):
    File "/usr/bin/cloud-init", line 9, in <module>
      load_entry_point('cloud-init==18.2', 'console_scripts', 'cloud-init')()
    File "/usr/lib/python2.7/site-packages/cloudinit/cmd/main.py", line 882, in main
      get_uptime=True, func=functor, args=(name, args))
    File "/usr/lib/python2.7/site-packages/cloudinit/util.py", line 2388, in log_time
      ret = func(*args, **kwargs)
    File "/usr/lib/python2.7/site-packages/cloudinit/analyze/__main__.py", line 102, in analyze_show
      (infh, outfh) = configure_io(args)
    File "/usr/lib/python2.7/site-packages/cloudinit/analyze/__main__.py", line 134, in configure_io
      infh = open(args.infile, 'r')
  IOError: [Errno 2] No such file or directory: '/var/log/cloud-init.log'

  
  I think it should fail more gracefully. This is:

  [root@demo3-node1 ~]# cloud-init --version
  /usr/bin/cloud-init 18.2

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1948450/+subscriptions



Follow ups