Conversation
| } | ||
| server, err := p.computeClient.RunServer(opts) | ||
| if err != nil { | ||
| return nil, &FatalError{fmt.Errorf("Could not create instance", err)} |
There was a problem hiding this comment.
Should the format string include a format specifier here?
There was a problem hiding this comment.
the FatalError means it is not needed to retry and it is built from an error, I already updated the error in the backend to make sure we retry only when it makes sense
There was a problem hiding this comment.
Oh okay, I see know thanks for explaining.
|
Awesome, we are able to allocate and discard on our openstack tenant. Do you think it's feasible to support adding security groups automatically? For example, we do not use a default |
Thanks for taking a look. I'll add few extra features: |
|
Specifying the network and security group work great! This passes our testing, I would support a +1 on getting this merged. Thanks! |
mvo5
left a comment
There was a problem hiding this comment.
Thanks for working on this Sergio! I did a first review and have some suggestion inline. I will also sync with Gustavo to ask how he wants to see this moving forward.
| return sameImage, fmt.Errorf("failed to retrieve images list: %s", errorTitle(err.Error())) | ||
| } | ||
|
|
||
| for _, i := range images { |
There was a problem hiding this comment.
I wonder if this code should be slightly more elaborate and follow googleProvider:image or linode:tempate(). linode is simpler and just does a prefix search but afaict all do more than just check for "contains"
There was a problem hiding this comment.
@mvo5 could you please elaborate a bit more this? In openstack the images dont have family or project associated as in gce, so because of that I used the contain.
There was a problem hiding this comment.
Sorry, I was mostly wondering what contraints there are about image names, I created a unit test for the code now so that we can explore various test cases and examples :)
04aa498 to
b08c9ca
Compare
This comment was marked as resolved.
This comment was marked as resolved.
mvo5
left a comment
There was a problem hiding this comment.
Gustavo also asked that backends that do not (yet) support the options network/groups should error when they are specified.
A smoke spread test against a real system should be included and unit tests as far as possible without modifying non-openstack code.
The way images are selected/filtered also needs a review.
|
@mvo5 about the network list associated to a machine, the consideration here is that where there are more than 1 network associated to a machine, the ip used by spread to connect has to be provided by the first network. I'll include that in the README. |
mvo5
left a comment
There was a problem hiding this comment.
Thanks, I looekd a bit more and I really like the updated spread test! I also added a few comments and suggestions and pushed some small tweaks.
| return sameImage, fmt.Errorf("failed to retrieve images list: %s", errorTitle(err.Error())) | ||
| } | ||
|
|
||
| for _, i := range images { |
There was a problem hiding this comment.
Sorry, I was mostly wondering what contraints there are about image names, I created a unit test for the code now so that we can explore various test cases and examples :)
9053022 to
8fbae16
Compare
Also include test to validate the key/secret authentication and tne env file
ZeyadYasser
left a comment
There was a problem hiding this comment.
Thank you, small comments
Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
devstack has many issues and cannot fully replicate a normal openstack cluster for testing. Signed-off-by: Zeyad Gouda <zeyad.gouda@canonical.com>
|
I dropped the spread test for openstack due to issues and inconsistencies faced with devstack where it cannot replicate a normal openstack cluster. A better alternative is to do something similar to google. After the openstack backend is merged, we add it as a backend in spread.yaml. |
Now the volumes are cleaned manually to avoid issues when using delete_on_termination=true Garbage collection also is update to delete orphan volumes
Establish a set of attributes to encode credentials instead of reading them directly from the environment. Only identity API version 3 is currently supported. Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
dariuszd21
left a comment
There was a problem hiding this comment.
Looks good to me, just minor questions
5e21ff2 to
2e787a8
Compare
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
This reverts commit ff94632.
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
Signed-off-by: Claudio Matsuoka <claudio.matsuoka@canonical.com>
niemeyer
left a comment
There was a problem hiding this comment.
Thank you very much to everyone involved in developing and polishing this backend, and thanks @cmatsuoka for polishing the final details for unblocking it. With your latest changes, the shared part of these changes seem to follow the existing patterns, and any remaining problems are going to be specific to OpenStack itself, so let's go ahead and get this in.
There's one final detail to be done shortly in a follow up, which is fixing the casing, per comment below. But this is fine to be done as a separate PR so we don't wait even longer than we already did.
| [LXD backend](#lxd) | ||
| [QEMU backend](#qemu) | ||
| [Google backend](#google) | ||
| [Openstack backend](#openstack) |
There was a problem hiding this comment.
The casing of the project name is incorrect, both in documentation and in the code itself. The project seems to call itself as OpenStack instead of Openstack, so I would suggest we follow suit and do a s/Openstack/OpenStack/ everywhere. Let's please keep "openstack", though (not "openStack").
This is the new openstack backend. Through this backend it is possible to run tests/tasks in openstack infrastructure.
The documenatation is also added explaning how to setup spread to use it.
For the openstack backend implementation the lib goose was used. This lib provides the clients needed to interact with the different openstack modules (nova. neutron, glance and, keystone).