Skip to content

Commit

Permalink
component/all: Machine downloads of unit resources
Browse files Browse the repository at this point in the history
For model migrations, machine agents (specifically the migrationmaster
worker) needs to be able to download unit resources.
  • Loading branch information
Menno Smits committed Dec 11, 2016
1 parent e6b4909 commit 7c0b642
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion component/all/resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,9 @@ func (r resources) registerHookContextFacade() {
func (r resources) registerUnitDownloadEndpoint() {
common.RegisterAPIModelEndpoint(privateapi.HTTPEndpointPattern, apihttp.HandlerSpec{
Constraints: apihttp.HandlerConstraints{
AuthKinds: []string{names.UnitTagKind},
// Machines are allowed too so that unit resources can be
// retrieved for model migrations.
AuthKinds: []string{names.UnitTagKind, names.MachineTagKind},
StrictValidation: true,
ControllerModelOnly: false,
},
Expand Down

0 comments on commit 7c0b642

Please sign in to comment.