openconfig / kne

Apache License 2.0
214 stars 64 forks source link

Add check for topology create to validate that images exist before starting cluster #40

Closed mhines01 closed 1 year ago

mhines01 commented 3 years ago

Add at least a warning that says if images are present on the cluster for the images referenced in the topology. This should be added in the form of an API check to the node implementations. If the node implementation is provided by a controller the controller should response to a RPC from the cli on if the controller can serve that image version

alexmasi commented 3 years ago

Do you mean a per-node type implementation, for example during node.New() for ceos (https://github.com/google/kne/blob/e76ec3a7476a47cefbf762f2c1a0cb2fecc0b54e/topo/node/ceos/ceos.go#L42) so that way the defaults for the node type could be set first?

Or do you mean an addition to the base node.go New() fn that would validate the proto? https://github.com/google/kne/blob/e76ec3a7476a47cefbf762f2c1a0cb2fecc0b54e/topo/node/node.go#L114

alexmasi commented 1 year ago

this has been fixed to fail early in the topology creation if the image cannot be pulled: https://github.com/openconfig/kne/pull/398