Błąd przy aktualizacji do wersji 19

Przy aktualizacji do wersji 19.4.15 z wersji 17.16 występuje błąd:

Cytat
Error: UPGRADE FAILED: cannot patch “anonimizator-api” with kind Deployment: Deployment.apps “anonimizator-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-anonimizator-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “btm” with kind Deployment: Deployment.apps “btm” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-btm”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “cloudadmin” with kind Deployment: Deployment.apps “cloudadmin” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-cloudadmin”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “ezdrp-api” with kind Deployment: Deployment.apps “ezdrp-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-ezdrp-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “ezdrp-web” with kind Deployment: Deployment.apps “ezdrp-web” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-ezdrp-web”, “environment”:“Development”, “role”:“frontend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “filerepo-api” with kind Deployment: Deployment.apps “filerepo-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-filerepo-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “ezdrp-forms” with kind Deployment: Deployment.apps “ezdrp-forms” is
invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-ezdrp-forms”, “environment”:“Development”, “role”:“frontend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “integrator-api” with kind Deployment: Deployment.apps “integrator-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-integrator-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “job-trigger” with kind Deployment: Deployment.apps “job-trigger” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-job-trigger”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “kuip-api” with kind Deployment: Deployment.apps “kuip-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-kuip-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “kuip-web” with kind Deployment: Deployment.apps “kuip-web” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-kuip-web”, “environment”:“Development”, “role”:“frontend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “ocr-api” with kind Deployment: Deployment.apps “ocr-api” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-ocr-api”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “razor” with kind Deployment: Deployment.apps “razor” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-razor”, “environment”:“Development”, “role”:"
backend"}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “sso-apigateway” with kind Deployment: Deployment.apps “sso-apigateway” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-sso-apigateway”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “sso-customexternalproviders” with kind Deployment: Deployment.apps “sso-customexternalproviders” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-sso-customexternalproviders”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “sso-identityserver” with kind Deployment: Deployment.apps “sso-identityserver” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-sso-identityserver”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “teryt” with kind Deployment: Deployment.apps “teryt” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-teryt”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable && cannot patch “wpe-rest” with kind Deployment: Deployment.apps “wpe-rest” is invalid: spec.selector: Invalid value: v1.LabelSelector{MatchLabels:map[string]string{“app”:“ezdrpapp-wpe-rest”, “environment”:“Development”, “role”:“backend”}, MatchExpressions:v1.LabelSelectorRequirement(nil)}: field is immutable

Cytat

Czy istnieje jakaś instrukcja aktualizacji? Wykonuję upgrade z Ranchera

1 polubienie

U mnie podczas próby aktualizacji wystąpiły takie same błędy. Czy komuś udało się z sukcesem wykonać aktualizację z repozytorium? Dołączam się do prośby o instrukcję aktualizacji.

Dzień dobry,
Instrukcja dot. aktualizacji do v_19 jest już prawie gotowa, czeka na akceptację. W najbliższych dniach powinna zostać upubliczniona.

Pozdrawiam,
Łukasz Markiewicz

1 polubienie

Dzień dobry,
Poniżej udostępniam link dot. aktualizacji do v_19 EZDRP:
https://podrecznik.ezdrp.gov.pl/instrukcja-aktualizacji-ezd-rp-do-wersji-19/

Pozdrawiam,
Łukasz Markiewicz

2 polubienia

Dziękuję, aktualizacja wg instrukcji powiodła się.

Mała sugestia przy aktualizacji Redis Database Configuration, Redis-append Database Configuration, Rabbit Database Configuration w instukcji pisze “Następnie zaznaczamy pole wyboru” a raczej powinno być “Następnie odznaczamy”.

Może warto także dodać edycję czasu timeout, który domyślnie jest na 600 sekund a często to nie wystarcza i aktualizacja czy instalacja kończy się przedwcześnie…

Dziękuję za pomoc.

Witam,
Posiadamy środowisko testowe (z bazami danych przeniesionymi poza Kubernetesa) na którym wersja 17.16 instaluje się bezproblemowo.
Instalacja wersji 19.4.15 każdorazowo kończy się niepowodzeniem na job-trigger.

Deployment is not ready: ezd/job-trigger. 0 out of 1 expected pods are ready
Error: UPGRADE FAILED: timed out waiting for the conditio

Poniżej przesyłam logi z pod-a:

/run-services.sh
2024-01-17T10:14:01.873477204Z /services/01-dnsmasq.sh
2024-01-17T10:14:01.875834772Z 
2024-01-17T10:14:01.875856090Z dnsmasq: failed to create inotify: No file descriptors available
2024-01-17T10:14:01.960206817Z Assembly resolve ICE.App, Version=6.56.0.0, Culture=neutral, PublicKeyToken=null requesting by ICE.AppCommon, Version=6.56.0.0, Culture=neutral, PublicKeyToken=null
2024-01-17T10:14:01.961912288Z Loader ExecutingAssemblyLoader, assembly: ICE.App, Version=6.56.0.0, Culture=neutral, PublicKeyToken=null, path: /app, using loader 
Assembly loaded /app/ICE.App.dll
ConfigurationModuleLoader: Loading modules by file setup
2024-01-17T10:14:02.008036504Z IceConfigFileHelper: Read ice configuration file ice.setup.json
2024-01-17T10:14:02.082475543Z ConfigurationModuleLoader: Loading Type: ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule, ICE.AppCommon by modules file setup
2024-01-17T10:14:02.082985378Z ConfigurationModuleLoader: Getting Type: ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule, ICE.AppCommon by modules file setup
2024-01-17T10:14:02.083152255Z ConfigurationModuleLoader: Type Loaded: ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule (name: ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule, ICE.AppCommon) by modules file setup
2024-01-17T10:14:02.147166343Z StatupModules: Registering at SETUP root module CloudAdminConfigSetupModule with order null
2024-01-17T10:14:02.147773019Z StatupModules: Checking license
2024-01-17T10:14:02.148160626Z StatupModules: Registering startup modules
2024-01-17T10:14:02.151777830Z StatupModules: Action REGISTER started
2024-01-17T10:14:02.152609315Z StatupModules: Action REGISTER on module CloudAdminConfigSetupModule
2024-01-17T10:14:02.153812009Z CloudAdminConfigSetupModule: Initialize Cloud Admin by file /app/env.zip
2024-01-17T10:14:02.155950514Z CloudAdminConfigSetupModule: Preparing request content
2024-01-17T10:14:02.157567508Z CloudAdminConfigSetupModule: Building cloud admin request
2024-01-17T10:14:02.158977235Z CloudAdminConfigSetupModule: Built request. keys count: 179
2024-01-17T10:14:02.212910242Z CloudAdminConfigSetupModule: Cloud Admin get config by url http://cloudadmin:2000/get-config
2024-01-17T10:14:02.212936359Z CloudAdminConfigSetupModule: Request built and getting cloud admin config from http://cloudadmin:2000
2024-01-17T10:14:07.396293882Z System.AggregateException: One or more errors occurred. (Resource temporarily unavailable (cloudadmin:2000))
2024-01-17T10:14:07.396323331Z  ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable (cloud
admin:2000)
2024-01-17T10:14:07.396327070Z  ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
2024-01-17T10:14:07.396329361Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
2024-01-17T10:14:07.396331549Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
2024-01-17T10:14:07.396336524Z    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.396339820Z    --- End of inner exception stack trace ---
2024-01-17T10:14:07.396341642Z    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.396360497Z    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
2024-01-17T10:14:07.396363782Z    at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
2024-01-17T10:14:07.396365554Z    at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.396367122Z    at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
2024-01-17T10:14:07.396369898Z    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.396371606Z    at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
2024-01-17T10:14:07.396375809Z    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
2024-01-17T10:14:07.396379503Z    at .(String , String , HttpClientRequest , Func`2 )
2024-01-17T10:14:07.396381121Z    at .SendAndReceiveStream(String , HttpClientRequest , String )
2024-01-17T10:14:07.396382601Z    at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.(String )
2024-01-17T10:14:07.396384144Z    at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.()
2024-01-17T10:14:07.396386144Z    at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.RegisterAsync(ISetupRoot root)
2024-01-17T10:14:07.396387764Z    --- End of inner exception stack trace ---
   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
   at System.Threading.Tasks.Task.Wait()
2024-01-17T10:14:07.396392543Z    at .(IStartupModule )
   at .(Action`1 , String )
2024-01-17T10:14:07.396395550Z    at .()
2024-01-17T10:14:07.396398340Z    at .( )
   at ICE.AppCommon.Startup.SetupModules.Run()
   at .(SetupModules )
   at .(String[] )
2024-01-17T10:14:07.396404469Z    at .(String[] )
   at .(String[] , CancellationToken )
UnhandledException caught : One or more errors occurred. (Resource temporarily unavailable (cloudadmin:2000))
2024-01-17T10:14:07.401616172Z StackTrace :    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2024-01-17T10:14:07.401640868Z    at System.Threading.Tasks.Task.Wait()
2024-01-17T10:14:07.401644417Z    at .(IStartupModule )
2024-01-17T10:14:07.401647017Z    at .(Action`1 , String )
2024-01-17T10:14:07.401648653Z    at .()
2024-01-17T10:14:07.401650797Z    at .( )
   at ICE.AppCommon.Startup.SetupModules.Run()
2024-01-17T10:14:07.401653960Z    at .(SetupModules )
2024-01-17T10:14:07.401655514Z    at .(String[] )
2024-01-17T10:14:07.401657115Z    at .(String[] )
2024-01-17T10:14:07.401659122Z    at .(String[] , CancellationToken )
2024-01-17T10:14:07.401660727Z    at ICE.App.Host.IceCoreApp.RunAsync(CancellationToken cancellationToken)
2024-01-17T10:14:07.401662937Z    at Program.<Main>$(String[] args) in /opt/buildagent/work/8db51a00579734dc/ezdrp/wyzwalacz_zadan/EZDRP.WyzwalaczZadan.App/Program.cs:line 10
2024-01-17T10:14:07.401664568Z    at Program.<Main>(String[] args)
Runtime terminating: True
2024-01-17T10:14:07.402904760Z Unhandled exception. System.AggregateException: One or more errors occurred. (Resource temporarily unavailable (cloudadmin:2000))
2024-01-17T10:14:07.402918351Z  ---> System.Net.Http.HttpRequestException: Resource temporarily unavailable (cloudadmin:2000)
2024-01-17T10:14:07.402920779Z  ---> System.Net.Sockets.SocketException (11): Resource temporarily unavailable
2024-01-17T10:14:07.402923161Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.ThrowException(SocketError error, CancellationToken cancellationToken)
2024-01-17T10:14:07.402924891Z    at System.Net.Sockets.Socket.AwaitableSocketAsyncEventArgs.System.Threading.Tasks.Sources.IValueTaskSource.GetResult(Int16 token)
   at System.Net.Sockets.Socket.<ConnectAsync>g__WaitForConnectWithCancellation|277_0(AwaitableSocketAsyncEventArgs saea, ValueTask connectTask, CancellationToken cancellationToken)
2024-01-17T10:14:07.402929130Z    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.402930879Z    --- End of inner exception stack trace ---
2024-01-17T10:14:07.402932660Z    at System.Net.Http.HttpConnectionPool.ConnectToTcpHostAsync(String host, Int32 port, HttpRequestMessage initialRequest, Boolean async, CancellationToken cancellationToken)
   at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.402936259Z    at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.402937970Z    at System.Net.Http.HttpConnectionPool.AddHttp11ConnectionAsync(HttpRequestMessage request)
2024-01-17T10:14:07.402939753Z    at System.Threading.Tasks.TaskCompletionSourceWithCancellation`1.WaitWithCancellationAsync(CancellationToken cancellationToken)
2024-01-17T10:14:07.402941415Z    at System.Net.Http.HttpConnectionPool.GetHttp11ConnectionAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
2024-01-17T10:14:07.402943180Z    at System.Net.Http.HttpConnectionPool.SendWithVersionDetectionAndRetryAsync(HttpRequestMessage request, Boolean async, Boolean doRequestAuth, CancellationToken cancellationToken)
2024-01-17T10:14:07.402958055Z    at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, Boolean async, CancellationToken cancellationToken)
   at Microsoft.Extensions.Http.Logging.LoggingHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
2024-01-17T10:14:07.402961406Z    at Microsoft.Extensions.Http.Logging.LoggingScopeHttpMessageHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken)
2024-01-17T10:14:07.402963715Z    at System.Net.Http.HttpClient.<SendAsync>g__Core|83_0(HttpRequestMessage request, HttpCompletionOption completionOption, CancellationTokenSource cts, Boolean disposeCts, CancellationTokenSource pendingRequestsCts, CancellationToken originalCancellationToken)
2024-01-17T10:14:07.402965612Z    at .(String , String , HttpClientRequest , Func`2 )
2024-01-17T10:14:07.402967340Z    at .SendAndReceiveStream(String , HttpClientRequest , String )
2024-01-17T10:14:07.402969260Z    at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.(String )
   at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.()
2024-01-17T10:14:07.402972445Z    at ICE.AppCommon.ConfigLoader.CloudAdminConfigSetupModule.RegisterAsync(ISetupRoot root)
2024-01-17T10:14:07.402974215Z    --- End of inner exception stack trace ---
2024-01-17T10:14:07.402976144Z    at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
2024-01-17T10:14:07.402977839Z    at System.Threading.Tasks.Task.Wait()
2024-01-17T10:14:07.402979805Z    at .(IStartupModule )
2024-01-17T10:14:07.402981381Z    at .(Action`1 , String )
2024-01-17T10:14:07.402982909Z    at .()
   at .( )
2024-01-17T10:14:07.402986009Z    at ICE.AppCommon.Startup.SetupModules.Run()
2024-01-17T10:14:07.402987544Z    at .(SetupModules )
2024-01-17T10:14:07.402989178Z    at .(String[] )
2024-01-17T10:14:07.402991010Z    at .(String[] )
2024-01-17T10:14:07.402992614Z    at .(String[] , CancellationToken )
   at ICE.App.Host.IceCoreApp.RunAsync(CancellationToken cancellationToken)
2024-01-17T10:14:07.403006017Z    at Program.<Main>$(String[] args) in /opt/buildagent/work/8db51a00579734dc/ezdrp/wyzwalacz_zadan/EZDRP.WyzwalaczZadan.App/Program.cs:line 10
2024-01-17T10:14:07.403007624Z    at Program.<Main>(String[] args)
failed to create fsnotify watcher: too many open files

Oczywiście aplikacja działa jednak bez poda job-trigger

Spróbuj zwiększyć timeout z 600 na sporo więcej może się po prostu instalacja nie wyrabia w czasie - ja dawałem 2400. 600 to trochę za mało nawet na dyskach SSD. Choć nie wiem czy to pomoże… :stuck_out_tongue:

Wydaje mi się że to nie naprawi problemu gdyż sam pods po 2h nadal ma status Crashloopback… więc wydłużenie czasu nie spowoduje że się uruchomi.

Udało się rozwiązać mój problem z integrator-api poprzez zastosowanie polecenia na wszystkich masterach i workerach:

echo fs.inotify.max_user_instances=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p

Pozdrawiam.