onie icon indicating copy to clipboard operation
onie copied to clipboard

image discovery: more logging of http attempts

Open cbrune opened this issue 8 years ago • 0 comments

ONIE only attempts full http wget on servers that are listening on port 80. It tries to connect to port 80 using nc and then if successful attempts the http download via wget. Only the wget http download attempt is logged. The port 80 probe is not logged.

Tthe same approach is not used for tftp. For tftp URLs, ONIE just blasts the attempt.

The reason was http (or wget actually) would hang for a longish time on servers that weren't even listening on port 80, whereas the tftp client would not hang. I'm not sure that is even true anymore.

The down side is, if your http server is down ONIE will not log anything. Can make debugging difficult.

Imagine you configured DHCP perfectly to hand back a default HTTP server (DHCP opt 72), but then forgot to start the http server. ONIE would not log any attempts against the http server.

The ask here is to log the failed port 80 probe attempts. That will give the end user a bit more info.

cbrune avatar Aug 17 '17 23:08 cbrune