OctopusDeploy / Issues

| Public | Bug reports and known issues for Octopus Deploy and all related tools
https://octopus.com
162 stars 20 forks source link

Updating calamari on all machines incorrectly reports no machines need updates #5276

Open matt-richardson opened 5 years ago

matt-richardson commented 5 years ago

Prerequisites

The bug

Updating calamari on all machines incorrectly reports that no machines need updates. The client passes MachineIds: [], which is incorrectly interpreted as no machines, and reported as No machines needs Calamari upgraded.

On investigating, it seems that the permissions check dont take into account this "no machines specified" == "all machines" in the ExtractDataFromModel method - this should be fixed at the same time as this issue.

This is related to https://github.com/OctopusDeploy/OctopusDeploy/pull/3411 / https://github.com/OctopusDeploy/Issues/issues/5263.

What I expected to happen

Steps to reproduce

$endpoint = new-object Octopus.Client.OctopusServerEndpoint "http://localhost:8065"
$repository = new-object Octopus.Client.OctopusRepository $endpoint
$LoginObj = New-Object Octopus.Client.Model.LoginCommand 
$LoginObj.Username = "admin"
$LoginObj.Password = "Password01!"

$repository.Users.SignIn($LoginObj)

$task = $repository.Tasks.ExecuteCalamariUpdate();

Affected versions

Octopus Server:

Workarounds

Pass the machine ids when creating the task

Links

source: internally reported

droyad commented 5 years ago

Related to #5263