bloomberg / cobbler-cookbook

A Chef cookbook for installing and maintaining Cobbler
Other
7 stars 15 forks source link

Need to create /var/log/cobbler/tasks/ and more? #13

Open cbaenziger opened 6 years ago

cbaenziger commented 6 years ago

It looks like moving to checkinstall in #10 broke cobbler sync as a fresh install of Chef-BACH now results in the following error:

  * bash[cobbler-sync] action run[2018-09-22T06:01:25+00:00] INFO: Processing bash[cobbler-sync] action run (cobblerd::default line 14)
[2018-09-22T06:01:25+00:00] INFO: Processing bash[cobbler-sync] action run (cobblerd::default line 14)

    [execute] task started: 2018-09-22_060125_sync
              task started (id=Sync, time=Sat Sep 22 06:01:25 2018)
              Traceback (most recent call last):
                File "/usr/local/bin/cobbler", line 36, in <module>
                  sys.exit(app.main())
                File "/usr/local/lib/python2.7/dist-packages/cobbler/cli.py", line 662, in main
                  rc = cli.run(sys.argv)
                File "/usr/local/lib/python2.7/dist-packages/cobbler/cli.py", line 284, in run
                  self.direct_command(direct_action)
                File "/usr/local/lib/python2.7/dist-packages/cobbler/cli.py", line 595, in direct_command
                  self.follow_task(task_id)
                File "/usr/local/lib/python2.7/dist-packages/cobbler/cli.py", line 611, in follow_task
                  file = open(logfile,'r')
              IOError: [Errno 2] No such file or directory: '/var/log/cobbler/tasks/2018-09-22_060125_sync.log'

    ================================================================================
    Error executing action `run` on resource 'bash[cobbler-sync]'
    ================================================================================
cbaenziger commented 6 years ago

Interestingly kitchen converge cobbler-source-images-ubuntu-1404 results in a different error:

         * bash[install cobbler] action run

           ================================================================================
           Error executing action `run` on resource 'bash[install cobbler]'
           ================================================================================

           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of "bash"  "/tmp/chef-script20180923-12420-1q5xzxj" ----
           STDOUT: Reading package lists...
           Building dependency tree...
           Reading state information...
           0 upgraded, 0 newly installed, 0 to remove and 177 not upgraded.
           STDERR: dpkg: error processing archive /tmp/kitchen/cache/cobbler.deb (--install):
            cannot access archive: No such file or directory
           Errors were encountered while processing:
            /tmp/kitchen/cache/cobbler.deb
           dpkg-query: no packages found matching cobbler
           ---- End output of "bash"  "/tmp/chef-script20180923-12420-1q5xzxj" ----
           Ran "bash"  "/tmp/chef-script20180923-12420-1q5xzxj" returned 1