mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 19:32:31 +00:00 
			
		
		
		
	`rmdef` command do not help clean up the recousrces that related to the node when removing the node. this is a technical debt. This patch is only a work around to add -C|--cleanup option to help remove the entries in goconserver.
		
			
				
	
	
		
			111 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			111 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| =head1 NAME
 | |
| 
 | |
| B<rmdef> - Use this command to remove xCAT data object definitions.
 | |
| 
 | |
| 
 | |
| =head1 SYNOPSIS
 | |
| 
 | |
| B<rmdef> [B<-h>|B<--help>] [B<-t> I<object-types>]
 | |
| 
 | |
| B<rmdef> [B<-V>|B<--verbose>] [B<-a>|B<--all>] [B<-t> I<object-types>] [B<-o> I<object-names>]
 | |
| [B<-f>|B<--force>] [B<-C>|B<--cleanup>] [I<noderange>]
 | |
| 
 | |
| 
 | |
| =head1 DESCRIPTION
 | |
| 
 | |
| This command is used to remove xCAT object definitions that are stored in the xCAT database.
 | |
| 
 | |
| 
 | |
| =head1 OPTIONS
 | |
| 
 | |
| =over 10
 | |
| 
 | |
| =item B<-a|--all>
 | |
| 
 | |
| Clear the whole xCAT database. A backup of the xCAT definitions should be saved before using this option as the xCAT daemons will no longer work once cleared.
 | |
| 
 | |
| To restore: 
 | |
| 
 | |
| =over 5
 | |
| 
 | |
| =item 1. B<export XCATBYPASS=1> and run the B<restorexCATdb> command.  
 | |
| 
 | |
| or 
 | |
| 
 | |
| =item 2. Run B<xcatconfig -d> which initializes the database the same as when xCAT was installed. 
 | |
| 
 | |
| =back
 | |
| 
 | |
| =item B<-f|--force>
 | |
| 
 | |
| Use this with the B<--all> option as an extra indicator that ALL definitions are to be removed.
 | |
| 
 | |
| =item B<-h|--help>
 | |
| 
 | |
| Display a usage message.
 | |
| 
 | |
| =item I<noderange>
 | |
| 
 | |
| A set of comma delimited node names and/or group names. See the "noderange" man page for details on supported formats.
 | |
| 
 | |
| =item B<-o> I<object-names>
 | |
| 
 | |
| A set of comma delimited object names.
 | |
| 
 | |
| =item B<-t> I<object-types>
 | |
| 
 | |
| A set of comma delimited object types.
 | |
| 
 | |
| =item B<-C|--cleanup>
 | |
| 
 | |
| Perform additional cleanup by running B<nodeset offline>, B<makeconservercf -d> and B<makegocons --cleanup> on the objects specified in the I<noderange>.
 | |
| 
 | |
| =item B<-V|--verbose>
 | |
| 
 | |
| Verbose mode.
 | |
| 
 | |
| =back
 | |
| 
 | |
| =head1 RETURN VALUE
 | |
| 
 | |
| 0 The command completed successfully.
 | |
| 
 | |
| 1 An error has occurred.
 | |
| 
 | |
| 
 | |
| =head1 EXAMPLES
 | |
| 
 | |
| =over 3
 | |
| 
 | |
| =item 1. To remove a range of node definitions.
 | |
| 
 | |
|  rmdef -t node node1-node4
 | |
| 
 | |
| =item 2. To remove all node definitions for the nodes contained in the group bpcnodes.
 | |
| 
 | |
|  rmdef -t node -o bpcnodes
 | |
| 
 | |
| =item 3. To remove the group called bpcnodes.
 | |
| 
 | |
|  rmdef -t group -o bpcnodes
 | |
| 
 | |
| (This will also update the values of the "groups" attribute of the member nodes.)
 | |
| 
 | |
| =back
 | |
| 
 | |
| =head1 FILES
 | |
| 
 | |
| $XCATROOT/bin/rmdef
 | |
| 
 | |
| (The XCATROOT environment variable is set when xCAT is installed. The
 | |
| default value is "/opt/xcat".)
 | |
| 
 | |
| 
 | |
| =head1 NOTES
 | |
| 
 | |
| This command is part of the xCAT software product.
 | |
| 
 | |
| =head1 SEE ALSO
 | |
| 
 | |
| L<mkdef(1)|mkdef.1>, L<lsdef(1)|lsdef.1>, L<chdef(1)|chdef.1>, L<xcatstanzafile(5)|xcatstanzafile.5>
 |