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

Lost git SCM export config after Rundeck update #6646

Open
tazou opened this issue Nov 30, 2020 · 11 comments · May be fixed by #7278
Open

Lost git SCM export config after Rundeck update #6646

tazou opened this issue Nov 30, 2020 · 11 comments · May be fixed by #7278

Comments

@tazou
Copy link

tazou commented Nov 30, 2020

Describe the bug
Hello,
After upgrading rundeck from 3.2.9.20200708-1 to 3.3.6.20201111-1 I lost the configuration of SCM Export with git for all my projects.

My Rundeck detail

  • Rundeck version: 3.3.6.20201111-1
  • install type: deb
  • OS Name/version: Debian 9.13
  • DB Type/version: postgres

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Project settings'
  2. Click on 'Setup SCM'
  3. The SCM Export is empty, I must do the configuration again.

Expected behavior
Excepted to not loose the SCM Export configuration after Rundeck upgrade.

If I do the SCM Export configuration again, and re-commit all the jobs for each projects, it's working, but it's a pain to reconfigure the 50 projects I already done.

Thank you :)
Best regards.

@MegaDrive68k
Copy link

Reproduced (3.2.9 -> 3.3.6), also happening on WAR based installation following this.

Thanks for your feedback @tazou!

@csimader
Copy link

Same on our site too update from 3.3.1 to 3.3.10 (war based installation)

@lschwahn
Copy link

lschwahn commented Apr 8, 2021

Same here. Updated the WAR file from 3.2.8-20200608 to 3.3.10.

@CraigInches
Copy link

CraigInches commented Apr 27, 2021

I have the same issue, but also seeing the config lost on each restart for version 3.3.10-20210301

@christi3k
Copy link

We're seeing this for rundeck version 3.3.10.20210301-1 as well as 3.4.2.20210803-1.

Both import and export configs are lost upon each rundeck service restart.

@abicky
Copy link

abicky commented Sep 29, 2021

I have the same issue and I think the PR #6414 is related.
Before the PR, FrameworkService#getServerUUID used to return null if the cluster mode was disabled because SERVER_UUID, which used to be referenced in the method, was set only when the cluster mode was enabled.
cf. https://github.com/rundeck/rundeck/blob/v3.3.4/rundeckapp/grails-app/init/rundeckapp/BootStrap.groovy#L209

As the config file path of SCM plugin uses the return value of FrameworkService#getServerUUID, the old configurations are never referenced after upgrade to Rundeck 3.3.4 or later.
cf. https://github.com/rundeck/rundeck/blob/v3.3.4/rundeckapp/grails-app/services/rundeck/services/ScmService.groovy#L277-L285

The property value rundeck.server.uuid in framework.properties is usually set even if the cluster mode is disabled.
For example, a post-install script sets the value:
https://github.com/rundeck/packaging/blob/abc38db6ea001f96839b72c4e42f0e7a948b410f/lib/deb/scripts/postinst#L82-L89

Even if we delete rundeck.server.uuid from framework.properties, the system property "rundeck.server.uuid" is set.
cf. https://github.com/rundeck/rundeck/blob/v3.3.4/rundeckapp/grails-app/init/rundeckapp/BootStrap.groovy#L165

Therefore we don't have any configurations to use the old configurations except for fixing the server UUID and changing the value of the column "dir" in the table "storage."
I wonder if this breaking change is expected.

abicky added a commit to abicky/rundeck that referenced this issue Sep 29, 2021
This commit resolves rundeck#6646.
As described on rundeck#6646 (comment),
FrameworkService#getServerUUID used to return null if the cluster
mode was disabled, that is, ScmService#pathForConfigFile used to
return the same value whether or not the cluster mode is enabled.
@abicky
Copy link

abicky commented Sep 29, 2021

I created the PR #7278.

abicky added a commit to abicky/rundeck that referenced this issue Dec 27, 2021
This commit resolves rundeck#6646.
As described on rundeck#6646 (comment),
FrameworkService#getServerUUID used to return null if the cluster
mode was disabled, that is, ScmService#pathForConfigFile used to
return the same value whether or not the cluster mode is enabled.
@isuftin
Copy link

isuftin commented Feb 2, 2022

This just happened to us moving from 3.4.9 to 3.4.10 :(

@dsiperek-vendavo
Copy link

Any updates?

@paulholden
Copy link

Moving the previous configuration file to new location seems to solve it, e.g.

Old: [projectroot]/etc/scm-export.properties
New: [projectroot]/7ef56d38-04c0-423f-976e-66e134f5f2bc/etc/scm-export.properties

@jjethwa
Copy link
Contributor

jjethwa commented Sep 24, 2022

Ran into this on my setup.

Add rundeck.server.uuid to your framework.properties. You can get your server UUID from the System Report page.

rundeck.server.uuid = <YOUR_CURRENT_RUNDECK_UUID>

abicky added a commit to abicky/rundeck that referenced this issue Feb 18, 2023
This commit resolves rundeck#6646.
As described on rundeck#6646 (comment),
FrameworkService#getServerUUID used to return null if the cluster
mode was disabled, that is, ScmService#pathForConfigFile used to
return the same value whether or not the cluster mode is enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.