mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-10-31 11:22:27 +00:00 
			
		
		
		
	Add server name to rspconfig dump output
This commit is contained in:
		| @@ -49,8 +49,9 @@ class OpenBMCBmcConfigTask(ParallelNodesCommand): | ||||
|  | ||||
|         formatted_time = time.strftime("%Y%m%d-%H%M", time.localtime(time.time())) | ||||
|         dump_log_file = '%s%s_%s_dump_%s.tar.xz' % (XCAT_LOG_DUMP_DIR, formatted_time, node, download_id) | ||||
|         host_name = os.uname()[1].split('.', 1)[0] | ||||
|         if flag_dump_process: | ||||
|             self.callback.info('%s: Downloading dump %s to %s' % (node, download_id, dump_log_file)) | ||||
|             self.callback.info('%s: Downloading dump %s to %s:%s' % (node, download_id, host_name, dump_log_file)) | ||||
|  | ||||
|         obmc.download_dump(download_id, dump_log_file) | ||||
|         if os.path.exists(dump_log_file): | ||||
| @@ -61,7 +62,7 @@ class OpenBMCBmcConfigTask(ParallelNodesCommand): | ||||
|             if grep_string: | ||||
|                 self.callback.error('Invalid dump %s was specified. Use -l option to list.' % download_id, node) | ||||
|             else: | ||||
|                 self.callback.info('%s: Downloaded dump %s to %s.' % (node, download_id, dump_log_file)) | ||||
|                 self.callback.info('%s: Downloaded dump %s to %s:%s.' % (node, download_id, host_name, dump_log_file)) | ||||
|         else: | ||||
|             self.callback.error('Failed to download dump %s to %s.' % (download_id, dump_log_file), node) | ||||
|         return | ||||
|   | ||||
| @@ -19,6 +19,7 @@ use JSON; | ||||
| use HTTP::Async; | ||||
| use HTTP::Cookies; | ||||
| use LWP::UserAgent; | ||||
| use Net::Domain qw(hostname); | ||||
| use File::Basename; | ||||
| use File::Spec; | ||||
| use File::Copy qw/copy cp mv move/; | ||||
| @@ -4196,7 +4197,8 @@ sub dump_download_process { | ||||
|         return 1; | ||||
|     } | ||||
|     if ($h->{message} eq $::RESPONSE_OK) { | ||||
|         xCAT::SvrUtils::sendmsg("Downloading dump $dump_id to $file_name", $callback, $node); | ||||
|         my $host_name = hostname(); | ||||
|         xCAT::SvrUtils::sendmsg("Downloading dump $dump_id to $host_name:$file_name", $callback, $node); | ||||
|         my $curl_dwld_result = `$curl_dwld_cmd -s`; | ||||
|         if (!$curl_dwld_result) { | ||||
|             if ($xcatdebugmode) { | ||||
| @@ -4215,7 +4217,7 @@ sub dump_download_process { | ||||
|                     # Remove downloaded file, nothing useful inside of it | ||||
|                     unlink $file_name; | ||||
|                 } else { | ||||
|                     xCAT::SvrUtils::sendmsg("Downloaded dump $dump_id to $file_name", $callback, $node) if ($::VERBOSE); | ||||
|                     xCAT::SvrUtils::sendmsg("Downloaded dump $dump_id to $host_name:$file_name", $callback, $node) if ($::VERBOSE); | ||||
|                 } | ||||
|             } | ||||
|             else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user