APIServer Run method doesn't validates if Machines, Services or Units are present on the request.

Bug #1456343 reported by Jorge Niedbalski
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Jorge Niedbalski

Bug Description

[Environment]

Trusty 14.04.2
Juju-core 1.23.3

[Description]

The method apiclient.server.Run doesn't checks if Machines, Services or Units are
present on the request and this can lead to unexpected results.

A validation should be made just like the client is doing:

         if len(c.machines) == 0 && len(c.services) == 0 && len(c.units) == 0 {
             return fmt.Errorf("You must specify a target, either through --all, --machine, --service or --unit")
         }

This bug tracks that fix.

Changed in juju-core:
status: New → In Progress
assignee: nobody → Jorge Niedbalski (niedbalski)
Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: none → 1.25.0
importance: Undecided → High
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.