Lines Matching refs:servers
28 """Discover the in-production servers to update.
31 @param server_filter: A set of servers to get status for.
34 The list is sorted by the order to be updated. Servers in the same
46 servers = rpc.run('get_servers')
48 # Do not update servers that need repair, and filter the server list by
50 servers = [s for s in servers
55 servers = [s for s in servers if 'devserver' not in s['roles'] and
63 for server in servers:
73 # Push all servers with unknown roles together.
77 found_servers = set([s['hostname'] for s in servers])
78 # Inject the servers passed in by user but not found in server database.
98 epilog=('Update all servers:\n'
107 'See what arguments would be run on specified servers:\n'
132 # args.servers['server_a', 'server_b']
137 # If -- isn't present, they are all servers.
138 results.servers = results.args
142 results.servers = results.args[:local_args_index-1]
185 def update_in_parallel(servers, options):
186 """Update a group of servers in parallel.
191 @param servers: A list of tuple of (server_name, server_status, roles).
196 for server, status, _ in servers:
220 print('Error! Failed to update following servers: %s' %
225 def update_group(servers, options):
226 """Update a group of servers in parallel.
231 @param servers: A list of tuple of (server_name, server_status, roles).
236 # all servers together.
238 update_in_parallel(servers, options)
246 for server, status, roles in servers:
254 rest_servers = [s for s in servers if not s[0] in server_picked]
268 sorted_servers = discover_servers(options.afe, set(options.servers or []))
273 for servers in sorted_servers:
274 print('%s Group %d (%d servers) %s' % ('='*30, i, len(servers), '='*30))
275 for server, status, roles in servers:
280 for servers in sorted_servers:
281 update_group(servers, options)