neoave / mrack

Multicloud use-case based multihost async provisioner for CIs and testing during development
Apache License 2.0
12 stars 14 forks source link

feat: Pull podman images and create networks in preparation #103

Closed Tiboris closed 3 years ago

Tiboris commented 3 years ago

Pull podman image in provisioning preparation to not block the provisioning or pull one image more than once which may cause unexpected errors.

Create podman networks in provisioning preparation to not block the provisioning or ty to create already created networks which may cause unexpected errors.

Signed-off-by: Tibor Dudlák tdudlak@redhat.com

bhavikbhavsar commented 3 years ago

Following scenarios were tested:

  1. Defined multiple hosts in the metadata for different OS, pre-setup pull only one image. https://pastebin.com/UhAqh9rZ - success Only missing image is pulled. Hosts within the same domain are able to communicate. Qs:

    • what if user wants to have the latest image pulled whenever mrack provisions?
  2. When url for image is incorrect in provisioning-config https://pastebin.com/j0hZ21fv - success Proper error is displayed

  3. When multiple domains defined in metadata. https://pastebin.com/9aG8DrKz - Fails Fails after creating the first two host from first domain as hostname are treated as same. Qs:

    • What should be default behaviour here, is it necessary for user to define separate hostname?
  4. Define different hostname for each domain. https://pastebin.com/YkdZATHv Current behaviours different network ips are assigned as per the domains. But all provisioned containers are able to communicate with one another. Qs:

    • What is the expected behaviour, when provisioned in two different domains? Should it be able to communicate between different domains or it should not?

Also a general observation between each mrack up had to delete mrackdb.json. It becomes annoying. Can a hashmap be created to record each run in db? So each time db file need not be deleted.

pvoborni commented 3 years ago

Following scenarios were tested:

1. Defined multiple hosts in the metadata for different OS, pre-setup pull only one image.
   https://pastebin.com/UhAqh9rZ - success
   Only missing image is pulled.
   Hosts within the same domain are able to communicate.
   Qs:

* what if user wants to have the latest image pulled whenever mrack provisions?

Don't know if we need it. But can be an RFE if needed.

1. When url for image is incorrect in provisioning-config
   https://pastebin.com/j0hZ21fv - success
   Proper error is displayed

2. When multiple domains defined in metadata.
   https://pastebin.com/9aG8DrKz - Fails
   Fails after creating the first two host from first domain as hostname are treated as same.
   Qs:

* What should be default behaviour here, is it necessary for user to define separate hostname?

It is expected in Mrack that each name of a host will be unique, regardless of domain. In such case it is better to use FQDNs. I don't know what is the error in such case, but it might be good RFE to fail early in such situation. In any case it is IMO not related to this PR.

1. Define different hostname for each domain.
   https://pastebin.com/YkdZATHv
   Current behaviours different network ips are assigned as per the domains. But all provisioned containers are able to communicate with one another.
   Qs:

* What is the expected behaviour, when provisioned in two different domains? Should it be able to communicate between different domains or it should not?

They should be able to communicate. E.g. for testing cross realm trusts (not supported now in IPA, but an example).

Also a general observation between each mrack up had to delete mrackdb.json. It becomes annoying. Can a hashmap be created to record each run in db? So each time db file need not be deleted.

I'd rephrase that if in the same working directory, host definition in metadata changes, especially in names of hosts, then it is required to delete the DB file. It is not required if metadata doesn't change. I guess we can define, what would be a good behavior in such case. In either supporting it better or at least writing better errors. That said, I'd recommend to have a separate working dir for different test cases.

Tiboris commented 3 years ago

Following scenarios were tested:

1. Defined multiple hosts in the metadata for different OS, pre-setup pull only one image.
   https://pastebin.com/UhAqh9rZ - success
   Only missing image is pulled.
   Hosts within the same domain are able to communicate.
   Qs:

* what if user wants to have the latest image pulled whenever mrack provisions?

Don't know if we need it. But can be an RFE if needed.

I like this idea, probably some option in provisioning-config.yaml to re pull if image exists.