Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenStack: Image name validations #2492

Merged

Conversation

Fedosin
Copy link
Contributor

@Fedosin Fedosin commented Oct 10, 2019

When the image is provided by user, i.e. not created automatically by the installer, we need to check that the image exists and there are no other images with this name.

@openshift-ci-robot openshift-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 10, 2019
@openshift-ci-robot openshift-ci-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Oct 10, 2019
@Fedosin Fedosin force-pushed the image_name_validations branch from 8da7fdf to 237ac4b Compare October 16, 2019 10:18
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Oct 16, 2019
@Fedosin Fedosin changed the title WIP: OpenStack: Image name validations OpenStack: Image name validations Oct 16, 2019
@openshift-ci-robot openshift-ci-robot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Oct 16, 2019
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 16, 2019

/hold cancel

@Fedosin Fedosin force-pushed the image_name_validations branch from 237ac4b to 126d03c Compare October 16, 2019 10:44
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 16, 2019

/retest

@jstuever
Copy link
Contributor

/label platform/openstack
/cc @mandre @tomassedovic
/uncc @jstuever

@openshift-ci-robot
Copy link
Contributor

@jstuever: The label(s) /label platform/openstack cannot be applied. These labels are supported: platform/aws, platform/azure, platform/baremetal, platform/google, platform/libvirt, platform/openstack, ga

In response to this:

/label platform/openstack
/cc @mandre @tomassedovic
/uncc @jstuever

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot requested review from mandre and tomassedovic and removed request for jstuever October 17, 2019 19:41
@mandre
Copy link
Member

mandre commented Oct 18, 2019

/label platform/openstack

@mandre
Copy link
Member

mandre commented Oct 18, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 18, 2019
@@ -41,3 +43,39 @@ func GenerateOpenStackImageName(rhcosImage, infraID string) (imageName string, i

return infraID + "-rhcos", true
}

// ValidateOverriddenOpenStackImageName checks if an overridden image name exists and there are no other images with this name.
func ValidateOverriddenOpenStackImageName(imageName, cloud string) error {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please move this to pkg/tfvars/openstack, that seems like the best place for this.

Also would like to recommend this be private function and not part of the package API

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! done

If the user provides an overridden Glance image name then we need to
validate that this image exists and there are no other images with
this name.
@Fedosin Fedosin force-pushed the image_name_validations branch from 126d03c to a165e24 Compare October 22, 2019 09:22
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed lgtm Indicates that a PR is ready to be merged. labels Oct 22, 2019
@Fedosin
Copy link
Contributor Author

Fedosin commented Oct 22, 2019

/test e2e-aws

@mandre
Copy link
Member

mandre commented Oct 22, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 22, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Fedosin, mandre

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit afb88e5 into openshift:master Oct 22, 2019
@Fedosin Fedosin deleted the image_name_validations branch November 1, 2019 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. platform/openstack size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants