Skip to content
This repository has been archived by the owner on Feb 10, 2022. It is now read-only.

Add special case for Azure Availability Sets #355

Merged
merged 1 commit into from Sep 24, 2019
Merged

Conversation

larham
Copy link
Contributor

@larham larham commented Sep 20, 2019

Add special case for Azure Availability Sets

As a workaround, we add a conditional to sense the Azure-only,
artificial zone value (the string "Availability Sets"),
and omit its usage as a value for the output of
environmental variable 'bosh.zone'.

What this PR does / why we need it:
Adapt to OpsMan 2.5+; fix breakage on Azure

How can this PR be verified?
Local test; integration pipeline under way

Is there any change in kubo-deployment?
No

Is there any change in kubo-ci?
No

Does this affect upgrade, or is there any migration required?
No

Which issue(s) this PR fixes:
https://pivotal-spike.atlassian.net/browse/PKS-349

Release note:

Fixes issue that prevented deployment with Azure Availability Sets

@cfdreddbot
Copy link

❌ Hey larham!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA). Click here for details on the CLA process.

The following github user @larham is not covered by a CLA.

After the CLA process is complete, this pull request will need to be closed & reopened. DreddBot will then validate the CLA(s).

Azure Availability Sets are miniature failure-domains, kind of like
specifying that the same rack should not be used to run multiple
instances of the same app.  (Azure is moving to have normal
Availability Zones (AZs) like other clouds, based on data-centers,
with one zone per data center.)

OpsMan 2.5+ decided to signal the usage of Azure Availability Sets by
setting the Zone to be a constant string "Availability Sets". In other
words, a Zone is required to be specified, and they overloaded the
meaning of zone to be both an attribute that holds the zone name and,
in this case, to hold a constant "signal" string.

Sadly, this string breaks some assumptions about zone names.
Any Availability Zone (or Availability Set) that is
input by user configuration should already
have been validated before it reaches this .erb template.
Further, the string does not comply with Kubernetes Label requirements.

As a workaround, we add a conditional to sense the Azure-only,
artificial zone value (the string "Availability Sets"),
and omit its usage as a value for the output of
environmental variable 'bosh.zone'.

[#168302689]
Copy link
Contributor

@professor professor left a comment

Choose a reason for hiding this comment

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

Looks great

@professor professor merged commit a44ae31 into master Sep 24, 2019
professor pushed a commit that referenced this pull request Sep 24, 2019
Azure Availability Sets are miniature failure-domains, kind of like
specifying that the same rack should not be used to run multiple
instances of the same app.  (Azure is moving to have normal
Availability Zones (AZs) like other clouds, based on data-centers,
with one zone per data center.)

OpsMan 2.5+ decided to signal the usage of Azure Availability Sets by
setting the Zone to be a constant string "Availability Sets". In other
words, a Zone is required to be specified, and they overloaded the
meaning of zone to be both an attribute that holds the zone name and,
in this case, to hold a constant "signal" string.

Sadly, this string breaks some assumptions about zone names.
Any Availability Zone (or Availability Set) that is
input by user configuration should already
have been validated before it reaches this .erb template.
Further, the string does not comply with Kubernetes Label requirements.

As a workaround, we add a conditional to sense the Azure-only,
artificial zone value (the string "Availability Sets"),
and omit its usage as a value for the output of
environmental variable 'bosh.zone'.

[#168302689]
@neil-hickey neil-hickey deleted the availability_sets branch June 25, 2021 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants