Project

General

Profile

Bug #6156

Updated by Brett Smith almost 9 years ago

h2. Goals 

 Have Do the process documented in our "compute node install guide":http://doc.arvados.org/install/install-compute-node.html work out of the box.    Right now this doesn't work because when the node first pings the API server, #ping assigns a slot_number for the node, then overwrites the hostname based on that. following: 

 We can't just have the sysadmin assign a slot_number in the install process, because it needs to be unique and it's hard to figure out a general way to accommodate that constraint. 

 h2. Implementation 

 * Introduce a configuration variable to API server @assign_node_hostname@ that can be provides a C-style printf format string to generate a compute node hostname given a slot_number.    It can also be set to false if the API server is not expected to generate hostnames. 
 * Update Node.hostname_for_slot to return a result based on the configured format string, or nil if the setting is unset. string. 
 * In Node#ping, Node#ping: 
 ** Only assign a slot_number if slot_number and hostname are both nil 
 ** Always assign a hostname generated by Node.hostname_for_slot if hostname is nil and @assign_node_hostname@ is set.    Move this code outside the @if self.slot_number.nil?@ block, below it—each value can be set independently when it's not included in the existing record. 
 * Only run the Node DNS checking code (below hostname_for_slot) when @assign_node_hostname@ is set. Don't consider slot_number in Node#crunch_worker_state. 

Back