Skip to content
This repository was archived by the owner on Jul 23, 2019. It is now read-only.

Additional small clean-ups from openshift/installer review#159

Merged
markmc merged 2 commits intoopenshift-metal3:masterfrom
stbenjam:fixmes
Jul 16, 2019
Merged

Additional small clean-ups from openshift/installer review#159
markmc merged 2 commits intoopenshift-metal3:masterfrom
stbenjam:fixmes

Conversation

@stbenjam
Copy link
Copy Markdown
Member

See commits for details, but this removes FIXME's and fixes some ordering issues.

@stbenjam
Copy link
Copy Markdown
Member Author

Don't merge until latest rebase is in, to avoid creating conflicts.

Comment thread pkg/asset/rhcos/image.go
osimage = "/resourceGroups/rhcos_images/providers/Microsoft.Compute/images/rhcostestimage"
case baremetal.Name:
// FIXME: baremetal
osimage, err = rhcos.QEMU(ctx)
Copy link
Copy Markdown
Member Author

@stbenjam stbenjam Jul 15, 2019

Choose a reason for hiding this comment

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

This doesn't need fixing, from @russellb

using the same image as libvirt is correct for the bootstrap VM
we do have: https://github.com/openshift-metal3/kni-installer/issues/37
which covers "use the right image for masters and workers"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah also see #100 where we need to consume two different images which fixes that issue, so I bypassed this abstraction - I think removing this FIXME is reasonable.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is ... ugh ...

Some of the underlying assumptions of the rhcos.Image abstraction:

  1. The same image is used for bootstrap, masters, and workers
  2. That image information is included in the generated machines manifests and also to terraform

I think we should follow that basic idea and just have an "oh hey, our bootstrap node boot image is different!" special case

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Yeah agree we need a better abstraction here which caters for the situation where the bootstrap and master images are different, I hacked around it in #100 but would welcome feedback on possible approaches there.

}
azure.ConfigMasters(machines, clusterID.InfraID)
case baremetaltypes.Name:
// FIXME: baremetal
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This was introduced in a rebase, before we created machines for baremetal. We create them now, so this FIXME (and the one below,I think) aren't needed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The thing that bothers me now with this code is that we're not using rhcosImage - i.e. nowhere in our machines resource are we describing the bootimage we used, unlike other platforms (except libvirt)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've filed #160 now

Even though the baremetal code path doesn't use the rhcosImage variable right now, it bothers me that the variable contains the wrong data for masters ...

stbenjam added 2 commits July 15, 2019 17:32
As requested in the openshift/installer review, the FIXME's in shared
code should be removed and tracked elsewhere.
This sets the order correctly in any code where baremetal is in the
wrong place, i.e. it should always occure after azure but before
libvirt.
@metal3ci
Copy link
Copy Markdown

Build FAILURE, see build http://10.8.144.11:8080/job/dev-tools/898/

@metal3ci
Copy link
Copy Markdown

Build SUCCESS, see build http://10.8.144.11:8080/job/dev-tools/900/

Copy link
Copy Markdown
Contributor

@markmc markmc left a comment

Choose a reason for hiding this comment

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

Happy to remove the FIXMEs now that #160 tracks them and gives more detail

}
azure.ConfigMasters(machines, clusterID.InfraID)
case baremetaltypes.Name:
// FIXME: baremetal
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The thing that bothers me now with this code is that we're not using rhcosImage - i.e. nowhere in our machines resource are we describing the bootimage we used, unlike other platforms (except libvirt)

}
azure.ConfigMasters(machines, clusterID.InfraID)
case baremetaltypes.Name:
// FIXME: baremetal
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I've filed #160 now

Even though the baremetal code path doesn't use the rhcosImage variable right now, it bothers me that the variable contains the wrong data for masters ...

Comment thread pkg/asset/rhcos/image.go
osimage = "/resourceGroups/rhcos_images/providers/Microsoft.Compute/images/rhcostestimage"
case baremetal.Name:
// FIXME: baremetal
osimage, err = rhcos.QEMU(ctx)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is ... ugh ...

Some of the underlying assumptions of the rhcos.Image abstraction:

  1. The same image is used for bootstrap, masters, and workers
  2. That image information is included in the generated machines manifests and also to terraform

I think we should follow that basic idea and just have an "oh hey, our bootstrap node boot image is different!" special case

@markmc markmc merged commit 0c7ca69 into openshift-metal3:master Jul 16, 2019
@stbenjam stbenjam deleted the fixmes branch July 16, 2019 14:34
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants