Home · About · Download · Documentation · Getting Help · Google+

Ticket #12 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

object --DELETE does not remove all objects while the types are mixed

Reported by: yqin Owned by: gmk
Priority: minor Milestone: Beta release
Component: general Version: 0.1
Keywords: Cc:

Description

Warewulf> object --DELETE
NAME TYPE
n0000 node
node node
print node
dynamic_hosts file
n0000 node

Are you sure you wish to delete the above objects?

Yes/No> yes
Deleted 5 objects
Warewulf> object
NAME TYPE
dynamic_hosts file
Warewulf> object --DELETE
NAME TYPE
dynamic_hosts file

Are you sure you wish to delete the above objects?

Yes/No> yes
Deleted 1 objects
Warewulf> object
WARNING: No objects found.

So the first "--DELETE" did not remove all 5 objects although it claimed it did. The second one clear the traces.

Change History

comment:1 Changed 7 years ago by gmk

  • Status changed from new to accepted

This is an oddball case... It has to do with the fact that the dynamic_hosts file object is dynamically generated. So the previous delete actually caused it to create a new object called dynamic_hosts (because it didn't exist anymore).

Suggestions on a fix to make it more intuitive?

comment:2 Changed 7 years ago by yqin

OK, I see. I'm not sure where that "Deleted 5 objects" message is printed right now. But can we add a similar message to all the "new", "import", "delete" and the like? For example, if we can print "Deleted 5 objects\nCreated 1 object" for this case I think that's sufficient.

comment:3 Changed 7 years ago by gmk

The object command is a "power user" command but if you were to use the node delete option, I think this would make more sense.

comment:4 Changed 7 years ago by yqin

Yes, indeed. It would better if we can document this special case.

comment:5 Changed 7 years ago by gmk

  • Status changed from accepted to closed
  • Resolution set to fixed

This has been temporarily documented here?, and will be maintained there until we have a better place.

Note: See TracTickets for help on using tickets.