+@Robert Harris
Hi Jeremy,
I’ve troubleshot more into the issue. We are trying to deprecate a Windows 2016 server that had our worker tentacles installed and our new servers are Windows 2019. We are running gcloud commands in Octopus via powershell. When run on Windows 2016 worker tentacles, the commands run fine. When ran on the Windows 2019 worker tentacles, the command fail with a NativeCommandError:
We are running the following:
gcloud config set project myProject
gcloud auth activate-service-account myServiceAccount --key-file=C:\myKeyFile.json
gcloud config list account --format “value(core.account)”
Even though powershell normally shows a NativeCommandError on all gcloud commands, the commands are running and returning from gcloud. This is expected behavior. Here is the output when running on powershell terminal on the VM. As you can see, the gcloud messages are returning success responses.
gcloud : Updated property [core/project].
At line:2 char:1
-
gcloud config set project myProject
-
-
CategoryInfo : NotSpecified: (Updated property [core/project].:String) [], RemoteException
-
FullyQualifiedErrorId : NativeCommandError
gcloud : Activated service account credentials for: [myServiceAccount]
At line:3 char:1
-
gcloud auth activate-service-account myServiceAccount …
-
-
CategoryInfo : NotSpecified: (Activated myServiceAccount]:String) [], RemoteException
-
FullyQualifiedErrorId : NativeCommandError
myServiceAccount
Running the same command in a custom script in powershell on a Windows 2016, here is the output. Notice that the calamari is not outputting the NativeCommandError error message wrapper, but only giving the gcloud success message output:
Updated property [core/project].
Activated service account credentials for: [myServiceAccount]
myServiceAccount
Running the same command in a custom script in powershell on a Windows 2019, here is the output. Notice that the calamari is not outputting the NativeCommandError error message wrapper on the first message, but fails on the second NativeCommandError and fails the octopus job.
Updated property [core/project].
NotSpecified: Activated service account credentials for: [myServiceAccount]
At C:\Octopus\Worker7\Work\20200731221346-878030-7\Script.ps1:3 char:1
at , C:\Octopus\int-nprod-mng-1-Worker7\Work\20200731221346-878030-7\Script.ps1: line 3
at , C:\Octopus\int-nprod-mng-1-Worker7\Work\20200731221346-878030-7\Bootstrap.Script.ps1: line 1358
at , : line 1
at , : line 1
The remote script failed with exit code 1
The action Test GCP Script on Worker Pool on a Worker failed
I have seen that this issue has been documented with Windows 2019 servers.
https://github.com/OctopusDeploy/Issues/issues/5755
We were only able to apply 1 of the recommended workaround as we were able. But the error continues to happen:
When will this be fixed? We are on a scheduled to deprecate the Windows 2016 server and need this working on Windows 2019. Are there other work arounds we can apply to get this issue?
