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

Change Grafana admin password in the apply mode (#2420) #2819

Merged
merged 7 commits into from
Jan 12, 2022

Conversation

sbbroot
Copy link
Contributor

@sbbroot sbbroot commented Dec 28, 2021

No description provided.

@przemyslavic
Copy link
Collaborator

przemyslavic commented Dec 28, 2021

@sbbroot the original issue #2420 is with re-running the apply command after changing the Grafana configuration, not with the upgrade mode.

@romsok24 romsok24 self-assigned this Dec 28, 2021
@sbbroot sbbroot force-pushed the grafana-password-change branch from dcc7b62 to 7391ba6 Compare December 29, 2021 08:14
@sbbroot sbbroot force-pushed the grafana-password-change branch from 7391ba6 to 549a9cf Compare January 3, 2022 21:22
@atsikham atsikham changed the title Change Grafana admin password in the upgrade mode (#2420) Change Grafana admin password in the apply mode (#2420) Jan 3, 2022
@seriva seriva requested a review from atsikham January 4, 2022 10:59
atsikham
atsikham previously approved these changes Jan 4, 2022
erzetpe
erzetpe previously approved these changes Jan 4, 2022
@rafzei
Copy link
Contributor

rafzei commented Jan 4, 2022

/azp run

@sbbroot sbbroot dismissed stale reviews from erzetpe and atsikham via cc8e896 January 5, 2022 08:10
seriva
seriva previously approved these changes Jan 5, 2022
erzetpe
erzetpe previously approved these changes Jan 5, 2022
@rafzei
Copy link
Contributor

rafzei commented Jan 5, 2022

@sbbroot During an upgrade with -f and new password in specification.grafana_security.admin_password, grafana.ini wasn't updated. 4/32 tests failed. I see vars in build dir were updated as expected.

  grafana_security:
    admin_user: admin
    admin_password: newpassword
14:50:24 INFO TASK [grafana : Change admin password using grafana-cli] ***********************
14:50:26 INFO  changed: [rafzei-2420-monitoring-vm-0]
root@rafzei-2420-monitoring-vm-0:~# grep 'password' /etc/grafana/grafana.ini 
admin_password = PASSWORD_TO_CHANGE

@seriva seriva requested review from seriva and erzetpe January 5, 2022 15:40
@przemyslavic
Copy link
Collaborator

przemyslavic commented Jan 5, 2022

@sbbroot During an upgrade with -f and new password in specification.grafana_security.admin_password, grafana.ini wasn't updated. 4/32 tests failed. I see vars in build dir were updated as expected.

  grafana_security:
    admin_user: admin
    admin_password: newpassword
14:50:24 INFO TASK [grafana : Change admin password using grafana-cli] ***********************
14:50:26 INFO  changed: [rafzei-2420-monitoring-vm-0]
root@rafzei-2420-monitoring-vm-0:~# grep 'password' /etc/grafana/grafana.ini 
admin_password = PASSWORD_TO_CHANGE

I suppose that for the apply mode in the following scenario it will be the same:
apply -> change password -> apply
I think we should update grafana.ini after the password has been successfully changed.

@sbbroot sbbroot dismissed stale reviews from erzetpe and seriva via 0c745a1 January 12, 2022 08:37
@sbbroot sbbroot force-pushed the grafana-password-change branch from cc8e896 to 0c745a1 Compare January 12, 2022 08:37
@rafzei
Copy link
Contributor

rafzei commented Jan 12, 2022

@sbbroot please add a comment on why you decided to do not to implement it in the upgrade procedure.

@rafzei
Copy link
Contributor

rafzei commented Jan 12, 2022

I've tested apply-> re-apply and looks fine.

@sbbroot sbbroot merged commit d03ce3a into hitachienergy:develop Jan 12, 2022
@sbbroot sbbroot deleted the grafana-password-change branch May 5, 2022 10:23
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 this pull request may close these issues.

7 participants