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

fix: use at most 15 letters for node name in cronjob name #124

Merged
merged 1 commit into from
May 14, 2024

Conversation

ushitora-anqou
Copy link
Contributor

@ushitora-anqou ushitora-anqou commented May 13, 2024

When the current implementation decides on a cronjob name, it uses at most 11 letters for a node name. This behaviour is problematic when a node name is an IP address, which can be at most 15 (= 3*4+3) letters. This commit fixes this problem by including at most 15 letters of the node name in the cronjob name. In compensation, this commit shrinks the length of the storage class name from 14 to 12.

A mount cronjob name (at most 40 letters) consists of:

  • "provision-" (10 letters)
  • PieProbe resource name (at most 10 letters)
  • hyphen (1 letter)
  • StorageClass name (at most 12 letters)
  • hyphen (1 letter)
  • hash (6 letters)

A provision cronjob name (at most 52 letters) consists of:

  • "mount-" (6 letters)
  • PieProbe resource name (at most 10 letters)
  • hyphen (1 letter)
  • Node name (at most 15 letters)
  • hyphen (1 letter)
  • StorageClass name (at most 12 letters)
  • hyphen (1 letter)
  • hash (6 letters)

When the current implementation decides a cronjob name, it uses at most
11 letters for a node name. This behavior is problematic when a node
name is an IP address, because it can have at most 15 (= 3*4+3)
letters. This commit fixes this problem by including at most 15
letters of the node name in the cronjob name. In compensation, this
commit shrinks the length of the storage class name to 12.

A mount cronjob name (at most 40 letters) consists of:

- "provision-" (10 letters)
- PieProbe resource name (at most 10 letters)
- hyphen (1 letter)
- StorageClass name (at most 12 letters)
- hyphen (1 letter)
- hash (6 letters)

A provision cronjob name (at most 52 letters) consists of:

- "mount-" (6 letters)
- PieProbe resource name (at most 10 letters)
- hyphen (1 letter)
- Node name (at most 15 letters)
- hyphen (1 letter)
- StorageClass name (at most 12 letters)
- hyphen (1 letter)
- hash (6 letters)

Signed-off-by: Ryotaro Banno <ryotaro.banno@gmail.com>
@ushitora-anqou ushitora-anqou marked this pull request as ready for review May 13, 2024 07:59
@ushitora-anqou ushitora-anqou requested a review from a team as a code owner May 13, 2024 07:59
@ushitora-anqou ushitora-anqou merged commit 902d05c into main May 14, 2024
6 checks passed
@ushitora-anqou ushitora-anqou deleted the fix-cronjob-name branch May 14, 2024 00:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

2 participants