From 47fbbd2230d15f68c4db8ea210a1c4ba79d363f8 Mon Sep 17 00:00:00 2001 From: asirxing Date: Wed, 29 May 2013 03:51:34 +0000 Subject: [PATCH] Move codes to call makedns and makehosts for kitnoderemove request from 00kitnodebase.pm to profilednodes.pm as other kitnoderemove plugins need the node name for some operations git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16439 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/00kitnodebase.pm | 8 -------- xCAT-server/lib/xcat/plugins/profilednodes.pm | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/00kitnodebase.pm b/xCAT-server/lib/xcat/plugins/00kitnodebase.pm index fa1e7720e..0cac579ef 100644 --- a/xCAT-server/lib/xcat/plugins/00kitnodebase.pm +++ b/xCAT-server/lib/xcat/plugins/00kitnodebase.pm @@ -148,14 +148,6 @@ sub process_request { setrsp_progress("Update DHCP entries"); $retref = xCAT::Utils->runxcmd({command=>["makedhcp"], node=>$nodelist, arg=>['-d']}, $request_command, 0, 2); log_cmd_return($retref); - - setrsp_progress("Updating DNS entries"); - $retref = xCAT::Utils->runxcmd({command=>["makedns"], node=>$nodelist, arg=>['-d']}, $request_command, 0, 2); - log_cmd_return($retref); - - setrsp_progress("Updating hosts entries"); - $retref = xCAT::Utils->runxcmd({command=>["makehosts"], node=>$nodelist, arg=>['-d']}, $request_command, 0, 2); - log_cmd_return($retref); } elsif ($command eq 'kitnodeupdate'){ setrsp_progress("Updating hosts entries"); diff --git a/xCAT-server/lib/xcat/plugins/profilednodes.pm b/xCAT-server/lib/xcat/plugins/profilednodes.pm index 50309d5a0..f3d7b8d71 100644 --- a/xCAT-server/lib/xcat/plugins/profilednodes.pm +++ b/xCAT-server/lib/xcat/plugins/profilednodes.pm @@ -532,6 +532,12 @@ Usage: } } + setrsp_progress("Updating DNS entries"); + $retref = xCAT::Utils->runxcmd({command=>["makedns"], node=>$nodes, arg=>['-d']}, $request_command, 0, 2); + + setrsp_progress("Updating hosts entries"); + $retref = xCAT::Utils->runxcmd({command=>["makehosts"], node=>$nodes, arg=>['-d']}, $request_command, 0, 2); + setrsp_progress("Removing nodes..."); $retref = xCAT::Utils->runxcmd({command=>["noderm"], node=>$nodes}, $request_command, 0, 2); $retstrref = parse_runxcmd_ret($retref);