Ticket #61 (closed defect: fixed)
Error messages with `wwsh bootstrap delete`
| Reported by: | bernard | Owned by: | gmk |
|---|---|---|---|
| Priority: | minor | Milestone: | Feature Update 3.2 |
| Component: | general | Version: | |
| Keywords: | Cc: |
Description
First, I create new bootstrap image:
[root@sl62-x86 ~]# wwbootstrap `uname -r` Number of drivers included in bootstrap: 467 Number of firmware images included in bootstrap: 47 Building and compressing bootstrap Integrating the Warewulf bootstrap: 2.6.32-220.el6.i686 Including capability: provision-adhoc Including capability: provision-files Including capability: provision-vnfs Including capability: setup-filesystems Including capability: setup-ipmi Including capability: transport-http Compressing the initramfs Locating the kernel object Bootstrap image '2.6.32-220.el6.i686' is ready Done.
Then I went ahead and delete it:
[root@sl62-x86 ~]# wwsh bootstrap delete
Are you sure you want to delete 1 bootstrap(s):
DEL: BOOTSTRAP = 2.6.32-220.el6.i686
Yes/No> yes
Integrating the Warewulf bootstrap: 2.6.32-220.el6.i686
gzip: stdin: unexpected end of file
cpio: premature end of archive
Including capability: provision-adhoc
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Including capability: provision-files
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Including capability: provision-vnfs
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Including capability: setup-filesystems
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Including capability: setup-ipmi
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Including capability: transport-http
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
sh: line 0: cd: /var/tmp/wwinitrd.tVJy78qVXecB/initramfs: No such file or directory
Compressing the initramfs
Locating the kernel object
cp: cannot stat `/var/tmp/wwinitrd.tVJy78qVXecB/kernel': No such file or directory
Bootstrap image '2.6.32-220.el6.i686' is ready
The image is deleted, but I got strange messages above.
Change History
comment:3 Changed 9 months ago by jms
[1052] appears to have fixed it. I did a quick test with using bootstrap import and then just bootstrap delete.
# rpm -qa | grep 'warewulf-common'
warewulf-common-3.3-0.r1061.noarch
# wwsh bootstrap delete test_boot
ERROR: Event did not return a valid Warewulf::RetVal object!
Are you sure you want to delete 1 bootstrap(s):
DEL: BOOTSTRAP = test_boot
Yes/No> Yes
Deleting local bootable bootstrap files: test_boot
ERROR: Event did not return a valid Warewulf::RetVal object!
#
Note: See
TracTickets for help on using
tickets.

It appears to me to be the following:
provision/lib/Warewulf/Event/Bootstrap.pm --
$event->register("bootstrap.add", \&build_bootstrap); $event->register("bootstrap.delete", \&delete_bootstrap); $event->register("bootstrap.modify", \&build_bootstrap);A delete is "technically" a modify. So once the bootstrap object is deleted, it tries building it since it triggers on all 'bootstrap' types. Maybe in 'common/lib/Warewulf/DataStore/SQL/MySQL.pm' instead of having:
Something like:
would be better so it only triggers the delete event if that's feasible?
-J