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

Adjust generated dhcp to match libvirt limitation of max 65535 addresses #753

Merged
merged 2 commits into from
Aug 4, 2020

Conversation

johscheuer
Copy link
Contributor

This PR fixes the issue with IPv6 and DHCP mentioned in #752 and ensures that only 2^16 addresses are used for the DHCP range (which is somehow a limitation of libvirt).

@MalloZup
Copy link
Collaborator

MalloZup commented Jul 5, 2020

@johscheuer thx for PR. CI is failing on this PR. We will need to have look

@johscheuer
Copy link
Contributor Author

I believe that the failing CI is not really related to the changes, since the failing tests are located in volume_image_test.go and complain about listen tcp :55130: bind: cannot assign requested address. Maybe some features that changed in travis?

--- FAIL: TestRemoteImageDetermineType (0.00s)
    volume_image_test.go:85: listen tcp :23032: bind: cannot assign requested address
=== RUN   TestRemoteImageDownloadRetry
2020/07/05 15:31:56 [DEBUG]: url resp status code 503 Service Unavailable (retry #0)
2020/07/05 15:31:58 [DEBUG]: url resp status code 503 Service Unavailable (retry #1)
2020/07/05 15:32:00 [DEBUG]: url resp status code 200 OK (retry #2)
2020/07/05 15:32:00 [DEBUG]: url resp status code 503 Service Unavailable (retry #0)
2020/07/05 15:32:02 [DEBUG]: url resp status code 404 Not Found (retry #1)
--- PASS: TestRemoteImageDownloadRetry (6.01s)
    volume_image_test.go:119: Server serving retry 0
    volume_image_test.go:119: Server serving retry 1
    volume_image_test.go:123: Server: success (after 2 errors)
    volume_image_test.go:119: Server serving retry 0
    volume_image_test.go:119: Server serving retry 1
=== RUN   TestRemoteImageDownload
--- FAIL: TestRemoteImageDownload (0.00s)
    volume_image_test.go:170: listen tcp :55130: bind: cannot assign requested address
FAIL

@@ -96,7 +117,7 @@ func (fws *fileWebServer) Start() error {

handler := http.NewServeMux()
handler.Handle("/", http.FileServer(http.Dir(dir)))
fws.server = &http.Server{Addr: fmt.Sprintf(":%d", fws.Port), Handler: handler}
fws.server = &http.Server{Addr: fmt.Sprintf("127.0.0.1:%d", fws.Port), Handler: handler}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume that somehow this bug was related travis-ci/travis-ci#8711? Are there any downsides to hardcode 127.0.0.1 (except that IPv6 doesn't work 😞)

@johscheuer
Copy link
Contributor Author

Friendly ping @MalloZup

@MalloZup
Copy link
Collaborator

@johscheuer ok thx I will add it on my backlog. sorry for delay

Copy link
Collaborator

@MalloZup MalloZup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

really good work @johscheuer I liked your PR

@MalloZup MalloZup merged commit 24e8344 into dmacvicar:master Aug 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants