Original scenario boot-and-associate-floating-ip.json didn't work and how to revise

Asked by JohnsonYi

Hi folks,

How to tailored the rally task, for example, how to revise boot-and-associate-floating-ip.json? what args should I add? Where the args refer to? is there any documents for these? Thanks in advance.

test scenario NovaServers.boot_and_associate_floating_ip
args position 0
args values:
{
  "runner": {
    "type": "constant",
    "concurrency": 1,
    "times": 1
  },
  "args": {
    "flavor": {
      "name": "m1.medium"
    },
    "image": {
      "name": "win2008srv-enterprise-v1.4.1"
    }
  },
  "context": {
    "users": {
      "project_domain": "default",
      "users_per_tenant": 1,
      "tenants": 1,
      "resource_management_workers": 30,
      "user_domain": "default"
    },
    "network": {
      "network_create_args": {
        "tenant_id": "525b32ae16694f4c92b7b84fb20f5b0f",
        "name": "rally_net_zYvqTvO6JIQdTMua"
      },
      "subnets_per_network": 1,
      "start_cidr": "10.2.0.0/24",
      "networks_per_tenant": 1
    }
  }
}
+-----------------------------------------------------------------------+
| Response Times (sec) |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+
| action | min | median | 90%ile | 95%ile | max | avg | success | count |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+
| total | n/a | n/a | n/a | n/a | n/a | n/a | 0.0% | 1 |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+

Question information

Language:
English Edit question
Status:
Solved
For:
Rally Edit question
Assignee:
No assignee Edit question
Solved by:
Alexander Maretskiy
Solved:
Last query:
Last reply:
Revision history for this message
JohnsonYi (yichengli) said :
#1

How to find references to customize "args", "runner", and "context"? any help commands or documents for these?

Revision history for this message
JohnsonYi (yichengli) said :
#2

2015-10-15 15:57:22.857 19395 INFO rally.task.engine [-] Running benchmark with key:
{
  "kw": {
    "runner": {
      "type": "constant",
      "concurrency": 1,
      "times": 1
    },
    "args": {
      "flavor": {
        "name": "m1.medium"
      },
      "image": {
        "name": "win2008srv-enterprise-v1.4.1"
      }
    },
    "context": {
      "users": {
        "users_per_tenant": 1,
        "tenants": 1
      },
      "network": {
        "start_cidr": "10.20.64.0/24"
      }
    }
  },
  "name": "NovaServers.boot_and_associate_floating_ip",
  "pos": 0
}
2015-10-15 15:57:22.873 19395 INFO rally.plugins.openstack.context.keystone.users [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | Starting: Enter context: `users`
2015-10-15 15:57:24.162 19395 INFO rally.plugins.openstack.context.keystone.users [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | Completed: Enter context: `users`
2015-10-15 15:57:24.163 19395 INFO rally.plugins.openstack.context.network.networks [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | Starting: Enter context: `network`
2015-10-15 15:57:26.359 19395 INFO rally.plugins.openstack.context.network.networks [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | Completed: Enter context: `network`
2015-10-15 15:57:27.448 19584 INFO rally.task.runner [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | ITER: 0 START
2015-10-15 15:57:28.614 19584 INFO rally.task.runner [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | ITER: 0 END: Error BadRequest: Multiple possible networks found, use a Network ID to be more specific. (HTTP 400) (Request-ID: req-51734624-ba78-4d24-b907-d1ec09229783)
2015-10-15 15:57:28.633 19395 INFO rally.plugins.openstack.context.cleanup.context [-] Task 4ce2ea8c-a17a-4ea6-83d7-6634543e5f94 | Starting: user resources cleanup

Revision history for this message
Andrey Kurilin (andreykurilin) said :
#3

Hi!
First of all, Rally docs contain description of all plugins - http://rally.readthedocs.org/en/latest/plugin/plugin_reference.html#plugin-reference . It also includes description of input arguments for scenarios.
Also, you should try `rally plugin show` command - http://rally.readthedocs.org/en/latest/tutorial/step_8_discovering_more_plugins.html .

Revision history for this message
JohnsonYi (yichengli) said :
#4

@Andrey

Thanks for the information. But I still don't know how to config scenario boot-and-associate-floating-ip.json.

While I try the default scenario boot-and-associate-floating-ip.json without revise, it failed as below,

root@rally:~/rally/testcase/nova# rally task start boot-and-associate-floating-ip.json
--------------------------------------------------------------------------------
 Preparing input task
--------------------------------------------------------------------------------

Input task is:

{
  "NovaServers.boot_and_associate_floating_ip": [
    {
      "runner": {
        "type": "constant",
        "concurrency": 1,
        "times": 1
      },
      "args": {
        "flavor": {
          "name": "m1.medium"
        },
        "image": {
          "name": "win2008srv-enterprise-web-v1.0.0"
        }
      },
      "context": {
        "users": {
          "users_per_tenant": 1,
          "tenants": 1
        },
        "network": {}
      }
    }
  ]
}

Task syntax is correct :)
2015-10-23 17:04:13.600 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Task validation.
2015-10-23 17:04:13.902 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Task validation of scenarios names.
2015-10-23 17:04:13.907 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Task validation of scenarios names.
2015-10-23 17:04:13.907 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Task validation of syntax.
2015-10-23 17:04:13.927 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Task validation of syntax.
2015-10-23 17:04:13.927 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Task validation of semantic.
2015-10-23 17:04:13.928 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Task validation check cloud.
2015-10-23 17:04:14.755 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Task validation check cloud.
2015-10-23 17:04:14.779 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Enter context: `users`
2015-10-23 17:04:20.990 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Enter context: `users`
2015-10-23 17:04:22.211 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Exit context: `users`
2015-10-23 17:04:29.229 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Exit context: `users`
2015-10-23 17:04:29.230 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Task validation of semantic.
2015-10-23 17:04:29.231 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Task validation.
Task config is valid :)
--------------------------------------------------------------------------------
 Task 76e79328-110d-4816-87d7-e1c62a87b938: started
--------------------------------------------------------------------------------

Benchmarking... This can take a while...

To track task status use:

 rally task status
 or
 rally task detailed

Using task: 76e79328-110d-4816-87d7-e1c62a87b938
2015-10-23 17:04:29.254 7449 INFO rally.api [-] Benchmark Task 76e79328-110d-4816-87d7-e1c62a87b938 on Deployment 4d215042-ab2a-4869-91bf-f8a7ad5eb974
2015-10-23 17:04:29.255 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Benchmarking.
2015-10-23 17:04:29.592 7449 INFO rally.task.engine [-] Running benchmark with key:
{
  "kw": {
    "runner": {
      "type": "constant",
      "concurrency": 1,
      "times": 1
    },
    "args": {
      "flavor": {
        "name": "m1.medium"
      },
      "image": {
        "name": "win2008srv-enterprise-web-v1.0.0"
      }
    },
    "context": {
      "users": {
        "users_per_tenant": 1,
        "tenants": 1
      },
      "network": {}
    }
  },
  "name": "NovaServers.boot_and_associate_floating_ip",
  "pos": 0
}
2015-10-23 17:04:29.607 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Enter context: `users`
2015-10-23 17:04:33.152 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Enter context: `users`
2015-10-23 17:04:33.153 7449 INFO rally.plugins.openstack.context.network.networks [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Enter context: `network`
2015-10-23 17:04:38.787 7449 INFO rally.plugins.openstack.context.network.networks [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Enter context: `network`
2015-10-23 17:04:42.857 7638 INFO rally.task.runner [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | ITER: 0 START
2015-10-23 17:04:43.953 7638 INFO rally.task.runner [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | ITER: 0 END: Error BadRequest: Multiple possible networks found, use a Network ID to be more specific. (HTTP 400) (Request-ID: req-13e345e1-ef1f-4099-9103-9cb4c8c85bbb)
2015-10-23 17:04:43.972 7449 INFO rally.plugins.openstack.context.cleanup.context [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: user resources cleanup
2015-10-23 17:04:47.061 7449 INFO rally.plugins.openstack.context.cleanup.context [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: user resources cleanup
2015-10-23 17:04:47.062 7449 INFO rally.plugins.openstack.context.network.networks [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Exit context: `network`
2015-10-23 17:04:50.534 7449 INFO rally.plugins.openstack.context.network.networks [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Exit context: `network`
2015-10-23 17:04:50.534 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Starting: Exit context: `users`
2015-10-23 17:04:54.430 7449 INFO rally.plugins.openstack.context.keystone.users [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Exit context: `users`
2015-10-23 17:04:56.287 7449 INFO rally.task.engine [-] Task 76e79328-110d-4816-87d7-e1c62a87b938 | Completed: Benchmarking.

--------------------------------------------------------------------------------
Task 76e79328-110d-4816-87d7-e1c62a87b938: finished
--------------------------------------------------------------------------------

test scenario NovaServers.boot_and_associate_floating_ip
args position 0
args values:
{
  "runner": {
    "type": "constant",
    "concurrency": 1,
    "times": 1
  },
  "args": {
    "flavor": {
      "name": "m1.medium"
    },
    "image": {
      "name": "win2008srv-enterprise-web-v1.0.0"
    }
  },
  "context": {
    "users": {
      "project_domain": "default",
      "users_per_tenant": 1,
      "tenants": 1,
      "resource_management_workers": 30,
      "user_domain": "default"
    },
    "network": {
      "network_create_args": {
        "tenant_id": "1e085b58e6d547258f14b23f8ac2eca3",
        "name": "rally_net_HccmMuOembtKAhZZ"
      },
      "subnets_per_network": 1,
      "start_cidr": "10.2.0.0/24",
      "networks_per_tenant": 1
    }
  }
}
+-----------------------------------------------------------------------+
| Response Times (sec) |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+
| action | min | median | 90%ile | 95%ile | max | avg | success | count |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+
| total | n/a | n/a | n/a | n/a | n/a | n/a | 0.0% | 1 |
+--------+-----+--------+--------+--------+-----+-----+---------+-------+
Load duration: 1.20024108887
Full duration: 24.8261539936

Revision history for this message
Best Alexander Maretskiy (maretskiy) said :
#5

Hi

1) Do not set "tenant_id" and "name" in context/network/network_create_args. Simply remove "network_create_args" at all.

That is because you are using `users' context (not `existing_users'), so tenants and users are generated by users context and tenant id can not be known before task start. Also explicit network name will cause name duplication in case of "networks_per_tenant" > 1. Network name is auto-generated so simply do not care about it at all.

Actually, all parameters in network context are optional, you can try `"network": {}'

2) For some reason, in your case there are more that one network available for server, so simply use `auto_assign_nic' parameter (see my sample below) - I believe this will solve the problem. Ref: https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L121

3) For now, you can use docstrings in source code for getting help with scenario arguments:

 boot_and_associate_floating_ip:
 https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/servers.py#L633-L639

 _boot_server (this extends boot_and_associate_floating_ip args)
 https://github.com/openstack/rally/blob/master/rally/plugins/openstack/scenarios/nova/utils.py#L110-L124

Try out this task file:

{
  "NovaServers.boot_and_associate_floating_ip": [
    {
      "runner": {
        "type": "constant",
        "concurrency": 1,
        "times": 1
      },
      "args": {
        "flavor": {
          "name": "m1.medium"
        },
        "image": {
          "name": "win2008srv-enterprise-web-v1.0.0"
        },
        "auto_assign_nic": true
      },
      "context": {
        "users": {
          "users_per_tenant": 1,
          "tenants": 1
        },
        "network": {
          "start_cidr": "10.2.0.0/24"
        }
      }
    }
  ]
}

Revision history for this message
Alexander Maretskiy (maretskiy) said :
#6

If you are still having issues, please give your rally version (as well as scenario output)

Revision history for this message
JohnsonYi (yichengli) said :
#7

Thanks Alexander Maretskiy, that solved my question.