https://rancher.com/ logo
Title
b

bland-painting-61617

10/03/2022, 1:14 PM
I think after you deploy longhorn once, those changes in values have no effect. you need to set the path up in the UI
g

great-photographer-94826

10/03/2022, 1:36 PM
It does not take over this value even during the first installation. Any other parameter changes take effect.
b

billowy-painting-56466

10/04/2022, 3:48 AM
Can you output
kubectl -n longhorn-system get pod
? Have you tried running helm install without ansible? ex:
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version=1.2.2 --set defaultSettings.backupTarget="<nfs://mynfsserver>:/exported/backup/longhorn"
g

great-photographer-94826

10/04/2022, 2:27 PM
In the first case, the value is correct (both Longhorn UI and Rancher Vaules YAML) if I run the command you specified:
helm install longhorn longhorn/longhorn --namespace longhorn-system --create-namespace --version=1.2.2 --set defaultSettings.backupTarget="<nfs://mynfsserver>:/exported/backup/longhorn/oldpath"
When I use the following command, it is no longer correct (Rancher Vaules YAML - newpath, Longhorn UI - oldpath):
helm upgrade longhorn longhorn/longhorn --namespace longhorn-system --version=1.2.2 --set defaultSettings.backupTarget="<nfs://mynfsserver>:/exported/backup/longhorn/newpath"
b

billowy-painting-56466

10/06/2022, 9:41 AM
Helm upgrade doesn't apply to the default setting for the Longhorn version before v1.3.0. You need to manually edit the settings. Ref https://longhorn.io/kb/troubleshooting-default-settings-do-not-persist/. For your case, is it possible Ansible deployed Longhorn first without the customized default setting then did a helm upgrade? You can try upgrading to v1.3.x. Ref issue, https://github.com/longhorn/longhorn/issues/2570.
g

great-photographer-94826

10/06/2022, 10:34 AM
@billowy-painting-56466 Thanks for the feedback! I will try v1.3.x. During the first installation, set some custom parameters (e.g. defaultDataLocality, createDefaultDiskLabeledNodes, etc). However, there are cases when it is necessary to add or modify few parameters, for example adding a new taintToleration.