Cerberus doesn't throw a warning or error when network doesn't contain any IP Ranges

Description

When poking around with /30 subnet (which resulted in previous ticket), and ending up with a /29 range instead, I forgot to add it to the network record itself. When creating VM, I selected this empty network and was able to start VM provision, which hanged in "placing" state for some time and then failed with no log records about it in Chunter logs.

In sniffle logs I found:
2015-12-08 00:42:58.485 [debug] <0.6160.0>@sniffle_create_fsm:get_server:374 [create] Finding hypervisor: [{must,allowed,[<<"hypervisors">>,{<<"res">>,<<"uuid">>},<<"create">>],{tree,[{'...',[{nothing,true}]}],{must,element,<<"virtualisation">>,<<"zone">>},{must,'>=',<<"resources.free-memory">>,512},{must,'>=',<<"sy
sinfo.Live Image">>,<<"20150806T063331Z">>}]
2015-12-08 00:42:58.488 [warning] <0.6724.0>@ft_hypervisor:getter:300 [ft_hypervisor] Accessing unsupported getter <<"sysinfo.Live Image">>, reverting to jsxd.
2015-12-08 00:42:58.488 [warning] <0.6728.0>@ft_hypervisor:getter:300 [ft_hypervisor] Accessing unsupported getter <<"sysinfo.Live Image">>, reverting to jsxd.
2015-12-08 00:42:58.490 [debug] <0.6160.0>@sniffle_create_fsm:get_server:378 [create] Hypervisors found: [{0,<<"96e47902-b2ee-47f4-8321-886475d2e076">>}]
2015-12-08 00:42:58.490 [debug] <0.6160.0>@sniffle_create_fsm:test_hypervisors:619 [create] test_hypervisors: <<"96e47902-b2ee-47f4-8321-886475d2e076">> [{<<"net0">>,[]}]
2015-12-08 00:42:58.492 [debug] <0.6160.0>@sniffle_create_fsm:test_hypervisor:640 [create] test_hypervisor: [<<"admin">>] [{<<"net0">>,[]}] []
2015-12-08 00:42:58.492 [debug] <0.6160.0>@sniffle_create_fsm:test_net:615 [create] test_net: false
2015-12-08 00:42:58.492 [warning] <0.6160.0>@sniffle_create_fsm:warn:785 [ff5051cc-fd0d-4f07-ae78-136cd2acd939] [create] Cound claim a lock on any of the provided hypervisors: [{0,<<"96e47902-b2ee-47f4-8321-886475d2e076">>}] -> {error,no_hypervisors}
2015-12-08 00:43:03.494 [debug] <0.6160.0>@sniffle_create_fsm:get_server:348 [create] get_server: [{<<"net0">>,[]}]}}

Steps to reproduce:

  1. Create a network "Foo"

  2. Create a VM and select network "Foo"

  3. Cerberus fails silently, sniffle logs show an error.

Cerberus (or Sniffle) should probably check if there's at least one IP range (shich has free IPs available) in a network before marking the "Networking" screen as correctly filled and throw a warning if it's not.

Environment

Latest SmartOS platform image, Project FiFo 0.7.0:

  • fifo-cerberus-0.7.0p7

  • fifo-howl-0.7.0p1

  • fifo-snarl-0.7.0p6

  • fifo-sniffle-0.7.0p7

  • fifo-watchdog-0.7.0

Status

Assignee

Heinz N. Gies

Reporter

Serge Tkatchouk

Labels

Components

Fix versions

Affects versions

Priority

High
Configure