13497: Merge branch 'master' into 13497-controller
authorTom Clegg <tclegg@veritasgenetics.com>
Fri, 15 Jun 2018 20:18:09 +0000 (16:18 -0400)
committerTom Clegg <tclegg@veritasgenetics.com>
Fri, 15 Jun 2018 20:18:09 +0000 (16:18 -0400)
refs #13497

Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tclegg@veritasgenetics.com>

1  2 
build/run-build-packages.sh
sdk/go/arvados/config.go

Simple merge
index 8856c929564cf3efb902e19ce48fe7f808c6862e,b0c7069cd98007ec0f24ad45cb809c137784eaae..841f95281e01a5ee7fd70e92832ea24f642799f4
@@@ -63,21 -62,24 +63,22 @@@ type InstanceType struct 
        RAM          int64
        Scratch      int64
        Price        float64
+       Preemptable  bool
  }
  
 -// GetThisSystemNode returns a SystemNode for the node we're running
 -// on right now.
 -func (cc *Cluster) GetThisSystemNode() (*SystemNode, error) {
 -      hostname, err := os.Hostname()
 -      if err != nil {
 -              return nil, err
 +// GetNodeProfile returns a NodeProfile for the given hostname. An
 +// error is returned if the appropriate configuration can't be
 +// determined (e.g., this does not appear to be a system node). If
 +// node is empty, use the OS-reported hostname.
 +func (cc *Cluster) GetNodeProfile(node string) (*NodeProfile, error) {
 +      if node == "" {
 +              hostname, err := os.Hostname()
 +              if err != nil {
 +                      return nil, err
 +              }
 +              node = hostname
        }
 -      return cc.GetSystemNode(hostname)
 -}
 -
 -// GetSystemNode returns a SystemNode for the given hostname. An error
 -// is returned if the appropriate configuration can't be determined
 -// (e.g., this does not appear to be a system node).
 -func (cc *Cluster) GetSystemNode(node string) (*SystemNode, error) {
 -      if cfg, ok := cc.SystemNodes[node]; ok {
 +      if cfg, ok := cc.NodeProfiles[node]; ok {
                return &cfg, nil
        }
        // If node is not listed, but "*" gives a default system node