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

Return Space-Less API Server Addresses to Consumers #10886

Merged
merged 3 commits into from Nov 8, 2019
Merged

Conversation

manadart
Copy link
Member

@manadart manadart commented Nov 8, 2019

Description of change

This patch fixes an error that can be observed when adding a space-less model (such as k8s) to a space-aware controller (such as MAAS).

MAAS decorates addresses with space IDs, which are returned as API addresses to clients and agents. However the space-less model does not have the space information for these to be resolved, so API connections from clients and agents return not-found errors for the address spaces.

Consumers of the API do not care about the address spaces anyway - they are only used to filter based on HA and management space configurations, so when we pass them out, there is no need to resolve the IDs to space names. Instead we just return space-less host/port parameters.

QA steps

  • Bootstrap a MAAS controller.
  • Deploy kubernetes-core.
  • Use the add-k8s command to add this cluster to the controller.
  • Add a k8s model.
  • Observe that status and deploy commands do not return not-found errors for spaces.

Documentation changes

None.

Bug reference

https://bugs.launchpad.net/juju/+bug/1851763

information instead of attempting to resolve it.

- Consumers don't care about space information, just where to reach the
  API servers.
- For a space-less model such as k8s, added to a space-aware controller
  such as MAAS, the model does not have the spaces loaded to look up,
  which results in errors.
@manadart manadart changed the title 2.7 Returns Space-Less API Server Addresses to Consumers Nov 8, 2019
@manadart manadart changed the title Returns Space-Less API Server Addresses to Consumers Return Space-Less API Server Addresses to Consumers Nov 8, 2019
@manadart
Copy link
Member Author

manadart commented Nov 8, 2019

K8s on MAAS Space Error

@@ -91,6 +91,10 @@ func IsUpgradeInProgressError(err error) bool {
// the user) has been migrated to a different controller.
type RedirectError struct {
// Servers holds the sets of addresses of the redirected servers.
// TODO (manadart 2019-11-08): Change this to be either MachineHostPorts
Copy link
Member Author

Choose a reason for hiding this comment

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

This seems OK to omit for now. These addresses are parsed rather than resolved by lookup.

Copy link
Contributor

@achilleasa achilleasa left a comment

Choose a reason for hiding this comment

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

LGTM

@manadart
Copy link
Member Author

manadart commented Nov 8, 2019

$$merge$$

@jujubot jujubot merged commit b06dda4 into juju:2.7 Nov 8, 2019
jujubot added a commit that referenced this pull request Nov 8, 2019
#10887

## Description of change

- Fixes a comment typo in `add-cloud` help text.
- Removes interface and test implementation no longer used following #10886

## QA steps

No functional changes; tests pass

## Documentation changes

None.

## Bug reference

https://bugs.launchpad.net/juju/+bug/1851801
@manadart manadart mentioned this pull request Nov 8, 2019
jujubot added a commit that referenced this pull request Nov 9, 2019
#10890

## Description of change

Merge from 2.7 bringing forward:
- #10887 from manadart/2.7
- #10886 from manadart/2.7
- #10879 from jujubot/increment-to-2.7-rc3
- #10872 from hmlanigan/containers
- #10875 from wallyworld/fix-doc-link
- #10866 from ycliuhw/fix/intermittent-crd-test
- #10869 from SimonRichardson/backport-track-branch
- #10868 from manadart/2.7-openstack-storage-az
- #10865 from wallyworld/features-from-develop
- #10863 from wallyworld/microk8s-checks
- #10864 from anastasiamac/lp1851441
- #10853 from wallyworld/increment-version-2.7-rc2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants