add halted to lb state list. #554

Merged
merged 1 commit into from Apr 27, 2015

Projects

None yet

3 participants

@hansode
Member
hansode commented Apr 24, 2015

Problem

The API does not support load_balancer.state specified filter with halted.

https://github.com/axsh/wakame-vdc/blob/master/dcmgr/lib/dcmgr/endpoints/12.03/load_balancers.rb#L9

  LOAD_BALANCER_STATE=['running', 'terminated'].freeze

https://github.com/axsh/wakame-vdc/blob/master/dcmgr/lib/dcmgr/endpoints/12.03/load_balancers.rb#L28-L29

           when *LOAD_BALANCER_STATE
             ds.by_state(params[:state])

Purpose to fix

  • In order to list poweron target.

Steps to reprocude:

  1. Create 1 load_balancer with mussel
  2. Power off one of created load_balancer with mussel
  3. API Call with load_balancer.state
$ mussel.sh load_balancer create --balance-algorithm leastconn --engine haproxy --instance-port 80 --instance-protocol http --max-connection 1000 --port 80 --protocol http
# => lb-A
$ mussel.sh load_balancer poweroff <*lb-A*>
$ mussel.sh load_balancer index --state alive
# => 1 lb
$ mussel.sh load_balancer index --state running
# => 0 lb 
$ mussel.sh load_balancer index --state halted
# => 1 lb
$ mussel.sh instance index --state terminated
# => 0 lb

Solution

Add halted to LOAD_BALANCER_STATE like following:

  LOAD_BALANCER_STATE=['running', 'halted', 'terminated'].freeze
@hansode hansode add halted to lb state list.
12219dc
@hansode hansode self-assigned this Apr 24, 2015
@hansode hansode added the Type : Bug label Apr 24, 2015
@axsh-bot
Member

12219dc success - wakame-ci/rspec

@axsh-bot
Member

12219dc success - wakame-ci/rpmbuild

@axsh-bot
Member

12219dc success - wakame-ci/to-s3

@axsh-bot
Member

12219dc failure - wakame-ci/lxc.smoke.allowed-failure

@axsh-bot
Member

12219dc failure - wakame-ci/dummy.smoke

@axsh-bot
Member

12219dc failure - wakame-ci/kvm.smoke.allowed-failure

@axsh-bot
Member

12219dc success - wakame-ci/vz.smoke

@axsh-bot
Member

12219dc success - wakame-ci/kvm.smoke

@axsh-bot
Member

12219dc success - wakame-ci/rspec

@axsh-bot
Member

12219dc success - wakame-ci/rpmbuild

@axsh-bot
Member

12219dc success - wakame-ci/to-s3

@axsh-bot
Member

12219dc failure - wakame-ci/lxc.smoke.allowed-failure

@axsh-bot
Member

12219dc success - wakame-ci/dummy.smoke

@axsh-bot
Member

12219dc failure - wakame-ci/kvm.smoke.allowed-failure

@axsh-bot
Member

12219dc success - wakame-ci/vz.smoke

@axsh-bot
Member

12219dc success - wakame-ci/kvm.smoke

@Metallion
Member

Looks good to me. +1

@Metallion Metallion merged commit e97ddee into master Apr 27, 2015

6 of 8 checks passed

wakame-ci/kvm.smoke.allowed-failure The build was failure on wakame-ci #18411 (12219dcb).
wakame-ci/lxc.smoke.allowed-failure The build was failure on wakame-ci #18409 (12219dcb).
wakame-ci/dummy.smoke The build was success on wakame-ci #18410 (12219dcb).
wakame-ci/kvm.smoke The build was success on wakame-ci #18419 (12219dcb).
wakame-ci/rpmbuild The build was success on wakame-ci #18398 (12219dcb).
wakame-ci/rspec The build was success on wakame-ci #18396 (12219dcb).
wakame-ci/to-s3 The build was success on wakame-ci #18400 (12219dcb).
wakame-ci/vz.smoke The build was success on wakame-ci #18413 (12219dcb).
@Metallion Metallion deleted the fix-lb-state-list branch Apr 27, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment