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

New Registration Flow being rolled out - requires adaption #186

Open
duritong opened this issue Jan 14, 2024 · 20 comments · May be fixed by #198
Open

New Registration Flow being rolled out - requires adaption #186

duritong opened this issue Jan 14, 2024 · 20 comments · May be fixed by #198
Assignees

Comments

@duritong
Copy link

Gitlab is rolling out a new registration workflow: https://docs.gitlab.com/ee/architecture/blueprints/runner_tokens/index.html#using-the-authentication-token-in-place-of-the-registration-token

This module should adapt to the new flow, since it's already confusing where you get the right token.

@SPFZ
Copy link

SPFZ commented Feb 2, 2024

@yakatz
Copy link
Contributor

yakatz commented Apr 5, 2024

I will try to put together a PR for this

@yakatz yakatz self-assigned this Jun 16, 2024
@yakatz
Copy link
Contributor

yakatz commented Jun 16, 2024

Just finishing up testing on this, hopefully done in the next day or two.

@tuxmea
Copy link
Member

tuxmea commented Jul 5, 2024

Any update on this? Do you need help?

@baurmatt
Copy link
Contributor

baurmatt commented Jul 5, 2024

Is there anything todo to get it working? I was able to use the new workflow without module adjustments. I think the only thing that needs to change is:

  • Remove deprecated parameters and (un)registration functions
  • Rework documentation

@yakatz
Copy link
Contributor

yakatz commented Jul 5, 2024

Any update on this? Do you need help?

I am also working on my PhD dissertation, so it is just a question of time. I should get it out in the next few days.

@yakatz
Copy link
Contributor

yakatz commented Jul 5, 2024

Is there anything todo to get it working? I was able to use the new workflow without module adjustments. I think the only thing that needs to change is:

  • Remove deprecated parameters and (un)registration functions
  • Rework documentation

My understanding is that the API endpoint that is being called is going to be changed/removed in Gitlab. Also, using the module as is, you can fill up the GitLab instance with phantom runners very easily because there is no simple way to verify if a runner is properly registered. I am working on changing the registration and I registration functions to use the runner executable for status information rather than calling the API which will also make it more resilient against any future changes.

@baurmatt
Copy link
Contributor

baurmatt commented Jul 8, 2024

@yakatz Thanks for your answer! It's unclear to me what you mean, but I'm looking forward to review the PR and get a better understanding of your implementation! :)

@dmaphy
Copy link

dmaphy commented Jul 15, 2024

Is there anything todo to get it working? I was able to use the new workflow without module adjustments. I think the only thing that needs to change is:

  • Remove deprecated parameters and (un)registration functions
  • Rework documentation

Interesting what you've done there as I didn't manage to do this until now. As the new registration process seems to always require that you create the runner via the web interface - at least in the first step, to generate the token (compare with https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/runner_tokens/). I've removed the redundant fields name and description and instantly received a Error: Failed to apply catalog: Gitlab runner failed to register: Internal Server Error.

At least removing the tag-list according to the following error message worked without any issues so far (the tag list has to be defined in the web interface when creating the runner now):

FATAL: Runner configuration other than name and executor configuration is reserved (specifically --locked, --access-level, --run-untagged, --maximum-timeout, --paused, --tag-list, and --maintenance-note) and cannot be specified when registering with a runner authentication token. This configuration is specified on the GitLab server. Please try again without specifying any of those arguments. For more information, see https://docs.gitlab.com/ee/ci/runners/new_creation_workflow.html#changes-to-the-gitlab-runner-register-command-syntax 

Looking forward to support you here where I can!

@yakatz
Copy link
Contributor

yakatz commented Jul 15, 2024 via email

@baurmatt
Copy link
Contributor

@dmaphy Are you using registration-token or token?

I've manually created a token in the UI and configured the token parameter while removing other deprecated/obsolete parameters registration-token, description, tag-list, run-untagged, ...

@dmaphy
Copy link

dmaphy commented Jul 16, 2024

I think my problem previously was, that I removed also the name, but removing the description would have been enough. Removing everything deprecated and renaming registration-token to token did the job! Thanks!

@yakatz
Copy link
Contributor

yakatz commented Jul 16, 2024

That technically works, but you run the risk of filling up the Gitlab instance with phantom runners since it creates a new runner entry every time the registration token is used.

@dmaphy
Copy link

dmaphy commented Jul 17, 2024

As I understand this [1] the runner has to be created via Gitlab UI. So no, I wasn't able to create more than one instance at the same time. Even with running the puppet run ten times or more.

[1] https://handbook.gitlab.com/handbook/engineering/architecture/design-documents/runner_tokens/#comparison-of-current-and-new-runner-registration-flow

@baurmatt
Copy link
Contributor

That technically works, but you run the risk of filling up the Gitlab instance with phantom runners since it creates a new runner entry every time the registration token is used.

I think that's only true for the old registration-token process, that's why I've implemented the gitlab_ci_runner::(un)register functions back in the days :)

This was referenced Jul 18, 2024
@juokelis
Copy link

I am trying to solve the issue in #198 but I am failing the tests. I assume that automated tests should be reimagined now with a new flow. The module looks like working through. At least foe me :) Please help me with the tests and let's get a new flow solution live at last.

@aleksejkov
Copy link

Do we have any new info regarding this issue?

@yakatz
Copy link
Contributor

yakatz commented Aug 27, 2024

Sorry I haven't gotten back to this yet. Hopefully in the next few days.

@traylenator
Copy link
Contributor

traylenator commented Nov 13, 2024

Hi any news ?

@yakatz
Copy link
Contributor

yakatz commented Nov 22, 2024

I have it on my todo list for this weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants