Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sometimes DHCP request fails #85

Closed
glimchb opened this issue Jul 7, 2022 · 5 comments · Fixed by #118
Closed

sometimes DHCP request fails #85

glimchb opened this issue Jul 7, 2022 · 5 comments · Fixed by #118
Assignees
Labels
bug Something isn't working provisioning

Comments

@glimchb
Copy link
Member

glimchb commented Jul 7, 2022

wrong

docker-compose -f docker-compose.pxe.yml exec -T pxe nmap --script broadcast-dhcp-discover
Starting Nmap 7.92 ( https://nmap.org/ ) at 2022-07-07 20:23 UTC
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.34 seconds

correct

+ docker-compose -f docker-compose.pxe.yml exec -T pxe nmap --script broadcast-dhcp-discover
Starting Nmap 7.80 ( https://nmap.org ) at 2022-07-07 21:12 UTC
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     IP Offered: 10.127.127.11
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.127.127.3
|     IP Address Lease Time: 5m00s
|_    Subnet Mask: 255.255.255.0
Nmap done: 0 IP addresses (0 hosts up) scanned in 0.20 seconds
WARNING: No targets were specified, so 0 hosts scanned.
@glimchb glimchb added the bug Something isn't working label Jul 7, 2022
@mestery
Copy link
Contributor

mestery commented Jul 11, 2022

Have we removed nmap from the pxe container recently:

vagrant@bullseye:/git/opi-poc/integration$ docker compose -f docker-compose.pxe.yml exec -it pxe bash
[root@767b475f2286 /]# nmap --script broadcast-dhcp-discover
bash: nmap: command not found
[root@767b475f2286 /]#

@glimchb
Copy link
Member Author

glimchb commented Jul 11, 2022

it was never there... test installed it before running... dnf install -y nmap
make sense to actually add it to the dockerfile...

@mestery
Copy link
Contributor

mestery commented Jul 11, 2022

It seems that the nmap command you document here fails on the first run every time, but works afterwards every time.

[root@450fb1d715b5 /]# nmap --script broadcast-dhcp-discover
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-11 21:26 UTC
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.20 seconds
[root@450fb1d715b5 /]# nmap --script broadcast-dhcp-discover
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-11 21:27 UTC
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     Interface: eth0
|     IP Offered: 10.127.127.11
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.127.127.3
|     IP Address Lease Time: 10m00s
|_    Subnet Mask: 255.255.255.0
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.20 seconds
[root@450fb1d715b5 /]# nmap --script broadcast-dhcp-discover
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-11 21:27 UTC
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     Interface: eth0
|     IP Offered: 10.127.127.11
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.127.127.3
|     IP Address Lease Time: 10m00s
|_    Subnet Mask: 255.255.255.0
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.22 seconds
[root@450fb1d715b5 /]# nmap --script broadcast-dhcp-discover
Starting Nmap 7.92 ( https://nmap.org ) at 2022-07-11 21:27 UTC
Pre-scan script results:
| broadcast-dhcp-discover:
|   Response 1 of 1:
|     Interface: eth0
|     IP Offered: 10.127.127.11
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.127.127.3
|     IP Address Lease Time: 10m00s
|_    Subnet Mask: 255.255.255.0
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.20 seconds
[root@450fb1d715b5 /]#

@glimchb
Copy link
Member Author

glimchb commented Jul 11, 2022

interesting... I haven't noticed...

@mestery mestery self-assigned this Jul 11, 2022
mestery added a commit to mestery/opi-poc that referenced this issue Jul 11, 2022
Makes debugging opiproject#85 easier.

Related to Isse opiproject#85

Signed-off-by: Kyle Mestery <mestery@mestery.com>
mestery added a commit to mestery/opi-poc that referenced this issue Jul 11, 2022
Makes debugging opiproject#85 easier.

Related to Isse opiproject#85

Signed-off-by: Kyle Mestery <mestery@mestery.com>
glimchb pushed a commit that referenced this issue Jul 11, 2022
Makes debugging #85 easier.

Related to Isse #85

Signed-off-by: Kyle Mestery <mestery@mestery.com>
@glimchb
Copy link
Member Author

glimchb commented Jul 13, 2022

also fails here https://github.com/opiproject/opi-poc/runs/7325367441?check_suite_focus=true

+ bash -c 'docker-compose exec -T pxe nmap --script broadcast-dhcp-discover'
Starting Nmap 7.92 ( https://nmap.org/ ) at 2022-07-13 16:46 UTC
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.68 seconds
+ bash -c 'docker-compose exec -T pxe nmap --script broadcast-dhcp-discover'
Starting Nmap 7.92 ( https://nmap.org/ ) at 2022-07-13 16:46 UTC
WARNING: No targets were specified, so 0 hosts scanned.
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.32 seconds
+ bash -c 'docker-compose exec -T pxe nmap --script broadcast-dhcp-discover'
Starting Nmap 7.92 ( https://nmap.org/ ) at 2022-07-13 16:47 UTC
Pre-scan script results:
WARNING: No targets were specified, so 0 hosts scanned.
| broadcast-dhcp-discover: 
|   Response 1 of 1: 
|     Interface: eth0
|     IP Offered: 10.127.127.12
|     DHCP Message Type: DHCPOFFER
|     Server Identifier: 10.127.127.3
|     IP Address Lease Time: 10m00s
|_    Subnet Mask: 255.255.255.0
Nmap done: 0 IP addresses (0 hosts up) scanned in 10.36 seconds

glimchb added a commit to glimchb/opi-poc that referenced this issue Jul 13, 2022
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
mestery pushed a commit that referenced this issue Jul 13, 2022
Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
mestery added a commit to mestery/opi-poc that referenced this issue Jul 13, 2022
The DHCP problem is due to overlapping IP addresses. We need the pool to
start sufficiently high enough that we won't overlap. With the existing
code, it was starting at 10.127.127.10. However, we now have containers
running up through 10.127.127.15. This moves it to start at
10.127.127.100.

Notice the erro messages here indicating this is the problem:

```
DHCPDISCOVER from de:ad:c0:de:ca:fe via eth0
ICMP Echo reply while lease 10.127.127.10 valid.
Abandoning IP address 10.127.127.10: pinged before offer
```

Fixes opiproject#85

Signed-off-by: Kyle Mestery <mestery@mestery.com>
mestery added a commit that referenced this issue Jul 13, 2022
The DHCP problem is due to overlapping IP addresses. We need the pool to
start sufficiently high enough that we won't overlap. With the existing
code, it was starting at 10.127.127.10. However, we now have containers
running up through 10.127.127.15. This moves it to start at
10.127.127.100.

Notice the erro messages here indicating this is the problem:

```
DHCPDISCOVER from de:ad:c0:de:ca:fe via eth0
ICMP Echo reply while lease 10.127.127.10 valid.
Abandoning IP address 10.127.127.10: pinged before offer
```

Fixes #85

Signed-off-by: Kyle Mestery <mestery@mestery.com>
glimchb added a commit to glimchb/opi-poc that referenced this issue Jul 13, 2022
iNow with opiproject#85 fixed, we can remove it

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
glimchb added a commit to glimchb/opi-poc that referenced this issue Jul 13, 2022
iNow with opiproject#85 fixed, we can remove it

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
glimchb added a commit that referenced this issue Jul 13, 2022
iNow with #85 fixed, we can remove it

Signed-off-by: Boris Glimcher <Boris.Glimcher@emc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working provisioning
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants