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

drop capability to specify image in install-config #1052

Merged
merged 7 commits into from
Jan 12, 2019

Conversation

abhinavdahiya
Copy link
Contributor

@abhinavdahiya abhinavdahiya commented Jan 11, 2019

includes commit from #812

RHCOS image that needs to be used for installation must be sources from RHCOS build pipeline and RHCOS build.
Keeping the image related fields in install-config allows users to change these values as part of valid configuration, but we do not want users to configure this option as
the RHCOS image controls the runtime and kubelet versions we depend on.

added OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE env with warning to override the image that will be used.

/cc @crawford @wking

None of the options, other than Image, that were in the Libvirt MachinePool were being used.
They have been removed. The Image has been pulled up to the Libvirt Platform, as there was no
way to use a different image for different machines pools.

For consistency with the AWS and OpenStack platforms, the Libvirt MachinePool has been retained,
even though it is empty. The DefaultMachinePlatform has been retained in the Libvirt Platform
as well.

The code in the Master Machines and Worker Machines assets that determines the configuration
to use for the machines has been adjusted for Libvirt to rectify the machine-pool-specific
configuration against the default machine-pool configuration. This is not strictly necessary
as, again, the Libvirt configuration is empty. It keeps the logic consistent with the other
platforms, though.

https://jira.coreos.com/browse/CORS-911
@openshift-ci-robot openshift-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jan 11, 2019
@abhinavdahiya abhinavdahiya changed the title WIP: drop capability to specify image in install-config drop capability to specify image in install-config Jan 11, 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 Jan 11, 2019
Copy link
Contributor

@staebler staebler left a comment

Choose a reason for hiding this comment

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

Changes look good.

Can we remove this function?

func (f realValidValuesFetcher) GetImageNames(cloud string) ([]string, error) {

@abhinavdahiya
Copy link
Contributor Author

Changes look good.

Can we remove this function?

installer/pkg/types/openstack/validation/realvalidvaluesfetcher.go

Line 66 in bf0c0de
func (f realValidValuesFetcher) GetImageNames(cloud string) ([]string, error) {

done with 83d9bf8

@@ -34,6 +35,7 @@ func (t *TerraformVariables) Name() string {
func (t *TerraformVariables) Dependencies() []asset.Asset {
return []asset.Asset{
&installconfig.InstallConfig{},
new(rhcos.Image),
Copy link
Member

@wking wking Jan 11, 2019

Choose a reason for hiding this comment

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

Why is this not &rhcos.Image{} like its neighbors? And the same elsewhere in this commit:

$ git show d65693719 | grep 'new('
+		new(rhcos.Image),
+	rhcosImage := new(rhcos.Image)
+		new(rhcos.Image),
+	rhcosImage := new(rhcos.Image)
+		new(rhcos.Image),
+	rhcosImage := new(rhcos.Image)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

https://play.golang.org/p/NUhwmraqAtM

prog.go:10:7: invalid pointer type *Image for composite literal

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@abhinavdahiya abhinavdahiya added this to the Freeze milestone Jan 11, 2019
@openshift-ci-robot openshift-ci-robot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jan 11, 2019
case libvirt.Name:
osimage, err = rhcos.QEMU(ctx, rhcos.DefaultChannel)
case openstack.Name:
osimage = "rhcos"
Copy link
Member

Choose a reason for hiding this comment

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

This is much-simplified from the previous GetImageNames you're removing in 83d9bf8. @hardys added that image-name select widget in #766, and sometimes OpenStack doesn't have reliable defaults (e.g. #788). Are we comfortable with a hard-coded value here, or do we need to retain some lookup logic or user input?

@abhinavdahiya
Copy link
Contributor Author

Drop:

added OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE env with warning to override the image that will be used.

from your commit message (and maybe add it to 8957997, since that's the commit adding the variable)?

Yeah, my original thought was somebody seeing this commit of dropping image fields from InstallConfig might benefit from it... but i can move it if you like?

Copy link
Member

@wking wking left a comment

Choose a reason for hiding this comment

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

I have one OpenStack concern and one Git nit, but I'm still fine with this PR landing as it stands before we address those. We can always circle back to OpenStack post-freeze.

@wking
Copy link
Member

wking commented Jan 12, 2019

Yeah, my original thought was somebody seeing this commit of dropping image fields from InstallConfig might benefit from it...

Maybe mention "in follow-up work" in the commit message? Or squash this PR down a bit, currently there are commits removing properties from structs before commits removing the property consumers and things like that. On the other hand, it's nice to see smaller pivots too. I don't really care either way at this stage ;).

added OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE env with warning to override the image that will be used.
With baseimage user query removed from TUI, this function is no longer required.

This also
- drops the vendored files
- updates the mocks using `hack/go-genmock.sh`
RHCOS image that needs to be used for installation must be sources from RHCOS build pipeline and RHCOS build.
Keeping the image related fields in install-config allows users to change these values as part of valid configuration, but we do not want users to configure this option as
the RHCOS image controls the runtime and kubelet versions we depend on.
@abhinavdahiya
Copy link
Contributor Author

commit 38e8cad784a118df38ac4f0e10cffce70455a711 (HEAD -> drop_ami)
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 13:02:55 2019 -0800

    docs: update the resource dep graph

commit b07f23e0a2dafb889ac97087c78bcf4a303ddd68
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 10:33:15 2019 -0800

    types: drop image options from install config for all platforms

    RHCOS image that needs to be used for installation must be sources from RHCOS build pipeline and RHCOS build.
    Keeping the image related fields in install-config allows users to change these values as part of valid configuration, but we do not want users to configure this option as
    the RHCOS image controls the runtime and kubelet versions we depend on.

commit 255566fa916bd1e40e8b9e5b3ec688105afc32d0
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 12:51:22 2019 -0800

    types/openstack: drop GetImageNames method

    With baseimage user query removed from TUI, this function is no longer required.

    This also
    - drops the vendored files
    - updates the mocks using `hack/go-genmock.sh`

commit 94d99583dd7d65e6a6812485c82eadab1ffd6b97
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 11:17:33 2019 -0800

    asset/installconfig: drop image related code paths

commit 3eb958b278b67acc616c56d76b1ec85e17fcb5dd
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 10:42:49 2019 -0800

    pkg: use rhcos Image to fetch ami for AWS

commit 2bd6c9d1293bab2d7b50046d61f7d385c0588054
Author: Abhinav Dahiya <abhinav.dahiya@redhat.com>
Date:   Fri Jan 11 10:41:46 2019 -0800

    asset: add rhcos Image asset to generate image location

    added OPENSHIFT_INSTALL_OS_IMAGE_OVERRIDE env with warning to override the image that will be used.

@wking does this look more appropriate? i'm changing all consumers first then dropping the property..?

@wking
Copy link
Member

wking commented Jan 12, 2019

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, wking

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:
  • OWNERS [abhinavdahiya,wking]

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

@wking
Copy link
Member

wking commented Jan 12, 2019

e2e-aws had lots of:

fail [github.com/openshift/origin/test/extended/builds/build_pruning.go:52]: Expected error:
    <*errors.errorString | 0xc4217d9ac0>: {
        s: "Failed to import expected imagestreams",
    }
    Failed to import expected imagestreams
not to have occurred

ending up with:

Failing tests:

[Conformance][Area:Networking][Feature:Router] The HAProxy router should expose prometheus metrics for a route [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds] forcePull should affect pulling builder images  ForcePull test case execution custom [Suite:openshift/conformance/parallel]
[Feature:Builds] forcePull should affect pulling builder images  ForcePull test case execution docker [Suite:openshift/conformance/parallel]
[Feature:Builds] forcePull should affect pulling builder images  ForcePull test case execution s2i [Suite:openshift/conformance/parallel]
[Feature:Builds][Conformance] oc new-app  should fail with a --name longer than 58 characters [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][Conformance] oc new-app  should succeed with a --name of 58 characters [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][Conformance][valueFrom] process valueFrom in build strategy environment variables  should fail resolving unresolvable valueFrom in docker build environment variable references [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][Conformance][valueFrom] process valueFrom in build strategy environment variables  should fail resolving unresolvable valueFrom in sti build environment variable references [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][Conformance][valueFrom] process valueFrom in build strategy environment variables  should successfully resolve valueFrom in docker build environment variables [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][Conformance][valueFrom] process valueFrom in build strategy environment variables  should successfully resolve valueFrom in s2i build environment variables [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  [Conformance] buildconfigs should have a default history limit set when created via the group api [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  [Conformance] buildconfigs should not have a default history limit set when created via the legacy api [Suite:openshift/conformance/parallel/minimal]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  should prune builds after a buildConfig change [Suite:openshift/conformance/parallel]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  should prune canceled builds based on the failedBuildsHistoryLimit setting [Suite:openshift/conformance/parallel]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  should prune completed builds based on the successfulBuildsHistoryLimit setting [Suite:openshift/conformance/parallel]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  should prune errored builds based on the failedBuildsHistoryLimit setting [Suite:openshift/conformance/parallel]
[Feature:Builds][pruning] prune builds based on settings in the buildconfig  should prune failed builds based on the failedBuildsHistoryLimit setting [Suite:openshift/conformance/parallel]
[Feature:DeploymentConfig] deploymentconfigs when run iteratively [Conformance] should immediately start a new deployment [Suite:openshift/conformance/parallel/minimal]
[Feature:DeploymentConfig] deploymentconfigs with multiple image change triggers [Conformance] should run a successful deployment with a trigger used by different containers [Suite:openshift/conformance/parallel/minimal]
[Feature:DeploymentConfig] deploymentconfigs with multiple image change triggers [Conformance] should run a successful deployment with multiple triggers [Suite:openshift/conformance/parallel/minimal]
[image_ecosystem][mongodb] openshift mongodb image  creating from a template should instantiate the template [Suite:openshift/conformance/parallel]

/retest

@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 f583689 into openshift:master Jan 12, 2019
tomassedovic added a commit to imain/ocp-doit that referenced this pull request Jan 18, 2019
The `baseImage` option is no longer doing anything:

openshift/installer#1052

The image must be called `rhcos`.
@dgoodwin
Copy link
Contributor

Breaking change for Hive. :( But the env var should cover us for now. Will raise in arch call about how we should handle this image ID long term, across upgrades, in an external system like Hive.

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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants