…ard CIDR notation
*More detailed description of your change,
if necessary. The PR title and PR message become
the squashed commit message, so use a separate
comment to ping reviewers.*
*Summary of testing strategy (including rationale)
for the feature or bug fix. Unit and/or integration
tests are expected for any behaviour change and
system tests should be considered for larger changes.*
I have manually verified the changes:
- I tested new help message is displayed
```
/ducker-ak up --help
ducker-ak: a tool for running Apache Kafka tests inside Docker images.
Usage: ./ducker-ak [command] [options]
help|-h|--help
Display this help message
up [-n|--num-nodes NUM_NODES] [-f|--force] [docker-image]
[-C|--custom-ducktape DIR] [-s|--subnet CIDR]
Bring up a cluster with the specified amount of nodes (defaults to 14).
The docker image name defaults to ducker-ak. If --force is specified, we
will
attempt to bring up an image even some parameters are not valid.
If --custom-ducktape is specified, we will install the provided custom
ducktape source code directory before bringing up the nodes. The provided
directory should be the ducktape git repo, not the ducktape installed
module directory.
If --subnet is specified, default Docker subnet is overriden by given IP
address and netmask,
using standard CIDR notation. For example: 192.168.1.5/24.
```
- Spinned up Docker containers with the new subnet argument and verified it is
used by ducknet:
```
$ ./ducker-ak up -n 5 --subnet 192.168.1.5/24
...
$ docker network inspect ducknet
[
{
"Name": "ducknet",
"Id":
"f4325c524feee777817b9cc57b91634e20de96127409c1906c2c156bfeb4beeb",
"Created": "2018-09-09T11:53:40.4332613Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.23.0.0/16",
"Gateway": "172.23.0.1"
}
]
},
...
```
- Spinned up Docker containers without the new subnet argument and verified it
is used default IP range allocated by docker is used:
```
$ ./ducker-ak up -n 2
...
$ docker network inspect ducknet
[
{
"Name": "ducknet",
"Id":
"7ebb38cd99e8a3fb84a65fd4eaad52dbe37e28dd83b6f0b57d512f66222397bd",
"Created": "2018-09-09T12:22:25.6561649Z",
"Scope": "local",
"Driver": "bridge",
"EnableIPv6": false,
"IPAM": {
"Driver": "default",
"Options": {},
"Config": [
{
"Subnet": "172.24.0.0/16",
"Gateway": "172.24.0.1"
}
]
},
...
```
### Committer Checklist (excluded from commit message)
- [ ] Verify design and implementation
- [ ] Verify test coverage and CI build status
- [ ] Verify documentation (including upgrade notes)
[ Full content available at: https://github.com/apache/kafka/pull/5628 ]
This message was relayed via gitbox.apache.org for [email protected]