) patches_tool = PatchesTool() patches_tool.patch_for_cascading_and_proxy_node() print( 'Finish to patch Hybrid-Cloud patches in cascading node and proxy nodes...' ) log.info( 'Finish to patch Hybrid-Cloud patches in cascading node and proxy nodes...' ) print('Start to patch Hybrid-Cloud patches in cascaded nodes...') log.info('Start to patch Hybrid-Cloud patches in cascaded nodes...') dispatch_patch_tool = DispatchPatchTool( proxy_match_region=config.CONF.DEFAULT.proxy_match_region) dispatch_patch_tool.remote_patch_for_cascaded_nodes() print('Finish to patch Hybrid-Cloud patches in cascaded nodes...') log.info('Finish to patch Hybrid-Cloud patches in cascaded nodes...') print('Start to restart openstack service for nova/neutron/cinder.') patches_tool.restart_service() print('Finish to restart openstack service for nova/neutron/cinder.') print('Start to verify services status') time.sleep(5) patches_tool.verify_services_status() print('Finish to verify services status') print('**** If found some status of some services are fault, ****')
) patches_tool = PatchesTool() patches_tool.patch_for_cascading_and_proxy_node() print( 'Finish to patch Hybrid-Cloud patches in cascading node and proxy nodes...' ) log.info( 'Finish to patch Hybrid-Cloud patches in cascading node and proxy nodes...' ) print('Start to patch Hybrid-Cloud patches in cascaded nodes...') log.info('Start to patch Hybrid-Cloud patches in cascaded nodes...') dispatch_patch_tool = DispatchPatchTool( proxy_match_region=config.CONF.DEFAULT.proxy_match_region) dispatch_patch_tool.remote_patch_for_cascaded_nodes() print('Finish to patch Hybrid-Cloud patches in cascaded nodes...') log.info('Finish to patch Hybrid-Cloud patches in cascaded nodes...') print('Start to restart openstack service for nova/neutron/cinder.') patches_tool.restart_service() print('Finish to restart openstack service for nova/neutron/cinder.') print('Start to verify services status') time.sleep(15) patches_tool.verify_services_status() print('Finish to verify services status') print('**** If found some status of some services are fault, ****')
) print( 'Option <restart> is use to restart services in cascading and proxy node.' ) print( 'Option <remote-backup> is use to backup fs code(nova, cinder, neutron) in /home/fsp/fs_code_backup dir.' ) print('Option <remote-recover> is use to ') exit(0) print('Start to config cascading....') log.init('patches_tool_config') log.info('Start to config cascading....') mode = sys.argv[1] export_region() config_cascading = ConfigCascading() dispatch_patch_tool = DispatchPatchTool( proxy_match_region=CONF.DEFAULT.proxy_match_region) # first to dispatch patch_tool to all cascaded node. if mode == 'cascading': # reinforce done config_cascading.config_cascading_nodes() elif mode == 'prepare': # remove by q00222219 # all_cascaded_hosts = get_all_cascaded_hosts() # all_proxy_hosts = get_all_proxy_hosts() # dispatch_patch_tool.dispatch_patches_tool_to_remote_nodes() dispatch_patch_tool.dispatch_patches_tool_to_remote_nodes_ex( config_cascading.proxy_match_region) # Config cascaded node.
) print( 'Option <restart> is use to restart services in cascading and proxy node.' ) print( 'Option <remote-backup> is use to backup fs code(nova, cinder, neutron) in /home/fsp/fs_code_backup dir.' ) print('Option <remote-recover> is use to ') exit(0) print('Start to config cascading....') log.init('patches_tool_config') log.info('Start to config cascading....') mode = sys.argv[1] export_region() config_cascading = ConfigCascading() dispatch_patch_tool = DispatchPatchTool( proxy_match_region=CONF.DEFAULT.proxy_match_region) #first to dispatch patch_tool to all cascaded node. if mode == 'prepare': all_cascaded_hosts = get_all_cascaded_hosts() all_proxy_hosts = get_all_proxy_hosts() utils.remote_open_root_permit_for_hosts(all_cascaded_hosts + all_proxy_hosts) utils.add_auto_route_for_fs(all_cascaded_hosts + all_proxy_hosts) dispatch_patch_tool.dispatch_patches_tool_to_remote_nodes() #Second to config cascading node to add proxy roles and config proxy nodes connect with cascaded nodes. elif mode == 'cascading': config_cascading.config_cascading_nodes() #Thrid to Config cascaded node to connect with cascading node.
if len(sys.argv) <= 1: print('Please select mode, options is: 1.prepare; 2. cascading; 3. check; 4. restart; 5.remote-backup; 6.remote-recover') print('Option <prepare> is use to copy patches_tool to proxy nodes and az nodes.') print('Option <cascading> is use to config cascading node and proxy node. Only need to execute once in cascading node.') print('Option <check> is use to check status of services in cascading and proxy node.') print('Option <restart> is use to restart services in cascading and proxy node.') print('Option <remote-backup> is use to backup fs code(nova, cinder, neutron) in /home/fsp/fs_code_backup dir.') print('Option <remote-recover> is use to ') exit(0) print('Start to config cascading....') log.init('patches_tool_config') log.info('Start to config cascading....') mode = sys.argv[1] export_region() config_cascading = ConfigCascading() dispatch_patch_tool = DispatchPatchTool(proxy_match_region=CONF.DEFAULT.proxy_match_region) # first to dispatch patch_tool to all cascaded node. if mode == 'cascading': # reinforce done config_cascading.config_cascading_nodes() elif mode == 'prepare': # remove by q00222219 # all_cascaded_hosts = get_all_cascaded_hosts() # all_proxy_hosts = get_all_proxy_hosts() # dispatch_patch_tool.dispatch_patches_tool_to_remote_nodes() dispatch_patch_tool.dispatch_patches_tool_to_remote_nodes_ex(config_cascading.proxy_match_region) # Config cascaded node. # dispatch_patch_tool.remote_config_cascaded_for_all_type_node()