next up previous contents
Next: 問題二 Up: 除錯 Previous: 除錯   Contents

問題一

  1. cloun-init-local 啟動失敗。
    [root@kvm7 ~]# /etc/init.d/cloud-init-local restart
    Starting cloud-init: Cloud-init v. 0.7.1 running 'init-local' at Mon, 05 Jan 2015 11:15:18 +0000. Up 439.95 seconds.
    Traceback (most recent call last):
      File "/usr/bin/cloud-init", line 509, in <module>
        sys.exit(main())
      File "/usr/bin/cloud-init", line 505, in main
        return functor(name, args)
      File "/usr/bin/cloud-init", line 234, in main_init
        init.purge_cache()
      File "/usr/lib/python2.6/site-packages/cloudinit/stages.py", line 133, in purge_cache
        util.del_file(f)
      File "/usr/lib/python2.6/site-packages/cloudinit/util.py", line 1316, in del_file
        raise e
    OSError: [Errno 21] Is a directory: '/var/lib/cloud/instance'
    
  2. 解決方式:移除 /var/lib/cloud/instance 目錄
    [root@kvm7 ~]# mv /var/lib/cloud/instance /tmp/
    [root@kvm7 ~]# /etc/init.d/cloud-init-local restart
    Starting cloud-init: Cloud-init v. 0.7.1 running 'init-local' at Mon, 05 Jan 2015 11:20:06 +0000. Up 727.87 seconds.
    [root@kvm7 ~]# ll /var/lib/cloud/instances/
    total 4
    drwxr-xr-x. 5 root root 4096 Jan 26  2014 iid-datasource-none
    [root@kvm7 ~]# ll /var/lib/cloud/instances -d
    drwxr-xr-x. 3 root root 4096 Jan 26  2014 /var/lib/cloud/instances
    


2015-12-29