portainer: BREAKING: update to 2.17 breaks editing existing git stacks (and prevents adding new ones)

Bug description After the upgrade, editing a git-deployed stack results in “Failure open (path to)/docker-stack.yml: no such file or directory”

Expected behavior Editing the stack should be possible as before.

Portainer Logs NOTE: These are the requested logs which are displayed when the error occurs. Looks like there is no relation from this logs to the error itself. This error is already an issue here: https://github.com/portainer/portainer/issues/8461

2023/02/13 09:34AM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/13 09:34AM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/13 09:34AM ERR endpointutils/endpointutils.go:166 > error while detecting storage classes | error="unsupported environment type"
    at (*ClientFactory).CreateClient(client.go:157)
    at (*ClientFactory).createCachedAdminKubeClient(client.go:132)
    at (*ClientFactory).GetKubeClient(client.go:77)
    at storageDetect(endpointutils.go:133)
    at InitialStorageDetection(endpointutils.go:162)
    at (*Handler).endpointInspect(endpoint_inspect.go:66)
    at LoggerHandler.ServeHTTP(error.go:23)
    at (*RequestBouncer).mwUpgradeToRestrictedRequest.func1(bouncer.go:230)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at (*RequestBouncer).mwCheckPortainerAuthorizations.func1(bouncer.go:191)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at (*RequestBouncer).mwAuthenticateFirst.func1(bouncer.go:281)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at mwSecureHeaders.func1(bouncer.go:379)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at (*Router).ServeHTTP(mux.go:212)
    at StripPrefix.func1(server.go:2152)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at (*Handler).ServeHTTP(handler.go:204)
    at (*OfflineGate).WaitingMiddleware.func1(offlinegate.go:39)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at (*Monitor).WithRedirect.func1(admin_monitor.go:117)
    at HandlerFunc.ServeHTTP(server.go:2109)
    at serverHandler.ServeHTTP(server.go:2947)
    at (*conn).serve(server.go:1991)
    at goexit(asm_amd64.s:1594)
2023/02/13 09:34AM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/13 09:34AM ERR endpointutils/endpointutils.go:172 > final error while detecting storage classes | error="unsupported environment type"
    at (*ClientFactory).CreateClient(client.go:157)
    at (*ClientFactory).createCachedAdminKubeClient(client.go:132)
    at (*ClientFactory).GetKubeClient(client.go:77)
    at storageDetect(endpointutils.go:133)
    at InitialStorageDetection.func1(endpointutils.go:171)
    at goexit(asm_amd64.s:1594)
2023/02/13 09:34AM ERR endpointutils/endpointutils.go:172 > final error while detecting storage classes | error="unsupported environment type"
    at (*ClientFactory).CreateClient(client.go:157)
    at (*ClientFactory).createCachedAdminKubeClient(client.go:132)
    at (*ClientFactory).GetKubeClient(client.go:77)
    at storageDetect(endpointutils.go:133)
    at InitialStorageDetection.func1(endpointutils.go:171)
    at goexit(asm_amd64.s:1594)
2023/02/13 09:34AM ERR endpointutils/endpointutils.go:172 > final error while detecting storage classes | error="unsupported environment type"
    at (*ClientFactory).CreateClient(client.go:157)
    at (*ClientFactory).createCachedAdminKubeClient(client.go:132)
    at (*ClientFactory).GetKubeClient(client.go:77)
    at storageDetect(endpointutils.go:133)
    at InitialStorageDetection.func1(endpointutils.go:171)
    at goexit(asm_amd64.s:1594)
2023/02/13 09:35AM ERR endpointutils/endpointutils.go:172 > final error while detecting storage classes | error="unsupported environment type"
    at (*ClientFactory).CreateClient(client.go:157)
    at (*ClientFactory).createCachedAdminKubeClient(client.go:132)
    at (*ClientFactory).GetKubeClient(client.go:77)
    at storageDetect(endpointutils.go:133)
    at InitialStorageDetection.func1(endpointutils.go:171)
    at goexit(asm_amd64.s:1594)

Steps to reproduce the issue:

  1. Deploy a new Stack from a template (provided by JSON) with this stack source and Portainer 2.16:
"repository": { "url": "https://gitlab+deploy-token-xxxx:xxxx@gitlab.com/xxxx/portainer-templates.git", "stackfile": "(path to)/docker-stack.yml" }
  1. Upgrade to 2.17
  2. Try to edit this stack
  3. The error mentioned above appears
  4. Try step one in 2.17 - Deploy not possible

Technical details:

  • Portainer version: 2.17
  • Docker version (managed by Portainer):
  • Platform (windows/linux): Linux (CentOS)
  • Use Case (delete as appropriate): Using Portainer in a Commercial setup
  • Have you reviewed our technical documentation and knowledge base? Yes

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (1 by maintainers)

Most upvoted comments

upgrading to 2.17.1 did not solve this issue for me.