portainer: Error while detecting storage classes "unsupported environment type"

Bug description After updating portainer-ce to 2.17.0 (from from 2.16.2) the following error is logged continuously: Error detecting storage classes | error="unsupported environment type"

Expected behavior No errors about storage or environment in log.

Portainer Logs

2023/02/07 10:48PM INF portainer/main.go:534 > encryption key file not present | filename=portainer
2023/02/07 10:48PM INF portainer/main.go:553 > proceeding without encryption key 
2023/02/07 10:48PM INF boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
2023/02/07 10:48PM INF datastore/backup.go:109 > creating DB backup 
2023/02/07 10:48PM INF datastore/backup.go:45 > copying DB file | from=/data/portainer.db to=/data/backups/common/portainer.db.2.16.0.20230207224812
2023/02/07 10:48PM INF boltdb/db.go:124 > loading PortainerDB | filename=portainer.db
2023/02/07 10:48PM INF datastore/migrate_data.go:108 > migrating database from version 2.16.0 to 2.17.0 
2023/02/07 10:48PM INF migrator/migrate_ce.go:53 > migrating data to 2.16.1 
2023/02/07 10:48PM INF migrator/migrate_dbversion71.go:10 > removing orphaned snapshots 
2023/02/07 10:48PM INF migrator/migrate_ce.go:53 > migrating data to 2.17.0 
2023/02/07 10:48PM INF migrator/migrate_dbversion80.go:69 > transfer type field to details field for edge stack status 
2023/02/07 10:48PM INF migrator/migrate_dbversion80.go:27 > updating existing endpoints to not detect metrics API for existing endpoints (k8s) 
2023/02/07 10:48PM INF migrator/migrate_dbversion80.go:48 > updating existing endpoints to not detect metrics API for existing endpoints (k8s) 
2023/02/07 10:48PM INF migrator/migrate_ce.go:79 > db migrated to 2.17.0 
2023/02/07 22:48:12 server: Reverse tunnelling enabled
2023/02/07 22:48:12 server: Fingerprint [REDACTED]
2023/02/07 22:48:12 server: Listening on 0.0.0.0:8000...
2023/02/07 10:48PM INF portainer/main.go:810 > starting Portainer | build_number=27403 go_version=1.19.4 image_tag=linux-amd64-2.17.0 nodejs_version=18.14.0 version=2.17.0 webpack_version=5.68.0 yarn_version=1.22.19
2023/02/07 10:48PM INF http/server.go:342 > starting HTTPS server | bind_address=:9443
2023/02/07 10:48PM INF http/server.go:327 > starting HTTP server | bind_address=:9000
2023/02/07 10:49PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 10:49PM 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/07 10:49PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 10:49PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 10:49PM 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/07 10:49PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 10:49PM 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/07 10:49PM 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/07 10:53PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 10:53PM 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/07 10:53PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 10:54PM 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/07 10:55PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 10:55PM 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/07 10:55PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 10:55PM 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/07 10:57PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 10:57PM 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/07 10:57PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 10:57PM 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/07 11:00PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:00PM 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/07 11:00PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:01PM 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/07 11:06PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:06PM 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/07 11:06PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:06PM 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/07 11:08PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:08PM 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/07 11:08PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:09PM 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/07 11:10PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:10PM 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/07 11:10PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:10PM 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/07 11:11PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:11PM 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/07 11:11PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:12PM 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/07 11:14PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:14PM 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/07 11:14PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds 
2023/02/07 11:15PM 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/07 11:23PM INF endpointutils/endpointutils.go:161 > attempting to detect storage classes in the cluster 
2023/02/07 11:23PM 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/07 11:23PM INF endpointutils/endpointutils.go:169 > retrying storage detection in 30 seconds

Steps to reproduce the issue:

  1. Stop portainer docker compose down
  2. Update the docker-compose.yml file with new image image: portainer/portainer-ce:2.17.0
  3. Start portainer docker compose up -d
  4. Login in portainer and inspect logs

Technical details:

  • Portainer version: portainer-ce:2.17.0
  • Docker version (managed by Portainer): 23.0.0 (API 1.42)
  • Kubernetes version (managed by Portainer):
  • Platform (windows/linux): Debian 11 (bullseye)
  • Command used to start Portainer (docker run -p 9443:9443 portainer/portainer):
  • Browser: Chromium Version 108.0.5359.94 (Official Build, ungoogled-chromium) (64-Bit)
  • Use Case (delete as appropriate): Using Portainer at Home.
  • Have you reviewed our technical documentation and knowledge base? Yes

Additional context Add any other context about the problem here.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 24
  • Comments: 62

Most upvoted comments

@tamarahenson this issue should be prioritized in version 2.17.2 since almost 90% of users experience this.

Update:

The internal issue I logged was reviewed by Product. And, will be resolved. I just do not yet have a timeline or release.

Thanks!

I’m hoping there’s some sort of update, we are a month plus since 2.17.1 launched and these errors are clogging the logs for Portainer, @tamarahenson can you give us any kind of update?

Do you have an ETA on the release? Within a week, month, etc?

Thank you!

Update:

This issue will be resolved in our next upcoming major release.

Thanks!

Update:

This issue is going to be resolved in 2.18. To further note, this issue is only adding erroneous errors in the logs due to a mistakenly called function. No other problems are being caused by this.

Thanks!

I have the same problem, I read earlier that this should be resolved in 2.18.x however, this is causing a lot of logging; advice to retract 2.17 or speedup fix.

@krassle

Thank you for the information. I have logged an internal request. I will update as I learn more.

Thanks!

Some problems for me.

Docker

Client:
 Version:           20.10.3
 API version:       1.41
 Go version:        go1.17.1
 Git commit:        55f0773
 Built:             Thu Jul 21 10:23:46 2022
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server:
 Engine:
  Version:          20.10.3
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.17.1
  Git commit:       b487c8f
  Built:            Thu Jul 21 10:21:56 2022
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          v1.4.3
  GitCommit:        3fa00912415f3e9c6f82dd72119179d599efd13b
 runc:
  Version:          v1.0.0-rc93
  GitCommit:        31cc25f16f5eba4d0f53e35374532873744f4b31
 docker-init:
  Version:          0.19.0
  GitCommit:        ed96d00

Running on Synology NAS.

Workaround for me was going back to 2.17.0, and portainer started to work again. Had been running 2.17.0 for a while without any issue. I think this bug is introduced to 2.17,1

Advice, retract version.

same on RPi 4B

Update:

I am able to reproduce the messages on Portainer Server Docker Standalone in Ubuntu 18.04.6 but not in Ubuntu 22.04.01. Both are on Docker 23.

Note: these messages do not appear on Portainer Server K8s in Ubuntu 18.04.6.

More to follow.

Thanks!

I’m seeing this on a new deployment using Ubuntu 22.04.01

@gjrtimmer

I have just upgraded my Portainer Server to 2.18.1. I am no longer seeing the error messages.

Thanks!

Update:

This issue is going to be resolved in 2.18. To further note, this issue is only adding erroneous errors in the logs due to a mistakenly called function. No other problems are being caused by this.

Thanks!

Hello,

Maybe I don’t understant your last comment but this is not only an error in the logs. on my side this is a no go for an upgrade to this version 😦 I am facing this issue on my portainer EE 2.17.0 and 2.17.1 and this is preventing me from switching to 2.17, I can’t update most of my containers.

The internal issue I logged was reviewed by Product. And, will be resolved. I just do not yet have a timeline or release.

It would be nice to hear any suggested workarounds in the mean time. (Downgrade, to which version? Anything else that can be done?)

Dear @tamarahenson Do you have any updates on this? A simple estimation would be greatly appreciated. I’m having production servers on this and waiting for recent issues to resume my processes! Kind regards

Portainer-EE

Same error on fresh and upgraded versions - Rocky Linux clusters. Any fixes would be appreciated.