Bug 561202

Summary: for some reason dhcpd server when not given -cf/-lf explicitely does not start OMAPI protocol
Product: [Fedora] Fedora Reporter: lejeczek <peljasz>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: jpopelka
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-07-26 07:58:05 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Description lejeczek 2010-02-02 20:57:13 EST
Description of problem:
quick fix is to use /etc/sysconfig/dhcpd
this problem applies to both, distro and mainline compilations on f13


Version-Release number of selected component (if applicable):
dhcp-4.1.0p1-17.fc12.x86_64

How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:
Comment 1 Jiri Popelka 2010-02-03 11:00:57 EST
Thanks for the report.
I must admit that I never tried to configure dhcpd to use OMAPI.
Can you help me and tell me if there are any brief steps to configure it and reproduce the bug.
Thanks
Comment 2 lejeczek 2010-02-03 12:50:06 EST
yes, omapi-port parameter in the config file enables OMAPI in dhcpd, well it should, or it could, and whether the fact that it does not work when no -cf/-lf are submitted is a result of intentional programming or it is a simply a bug, I cannot tell.
it would be worth asking developers themselves, to me it's obvious misbehaviour, if not, I can only ask, why?
just use omapi-port in the config, run it from prompt or with service, you should see no dhcp listening on your chosen port
run it with quick fix or from prompt with earlier mentioned params and dhcp should be fine having port opened
cheers
Comment 3 Jiri Popelka 2010-06-29 10:10:29 EDT
Hi,

sorry for such a big delay.
I tested this issue, but for me it works.

I added omapi-port to dhcpd.conf and started dhcpd without -cf and -lf.
Then on client machine I started dhclient to obtain address from server.
Then I used omshell (OMAPI  Command  Shell) to connect to server and
query its state via OMAPI. And I succeeded.

N-V-R: dhcp-4.1.1-22.P1.fc13.i686

In more detail:

1) on server (192.168.0.113)
$ cat /etc/dhcp/dhcpd.conf
omapi-port 520;
subnet 192.168.0.0 netmask 255.255.255.0 {
    range 192.168.0.11 192.168.0.20;
}
$ dhcpd -d eth1

2) on client
$ dhclient -d eth1
bound to 192.168.0.11
$ omshell
> server 192.168.0.113
> port 520
> connect
obj: <null>
> new lease
obj: lease
> set ip-address = 192.168.0.11
obj: lease
ip-address = c0:a8:00:0b
> open
obj: lease
ip-address = c0:a8:00:0b
state = 00:00:00:02
subnet = 00:00:00:02
pool = 00:00:00:03
hardware-address = 08:00:27:9a:d0:ef
hardware-type = state = 00:00:00:01
ends = 4c:2a:b8:c6
starts = 4c:2a:10:06
tstp = 00:00:00:00
tsfp = 00:00:00:00
atsfp = 00:00:00:00
cltt = 4c:2a:10:06
flags = 00

I can see all the information the DHCP server has about that particular lease.
So the OMAPI obviously runs on server even if started without -cf and -lf.

How do you check whether the port is opened?
I used 'nmap -A localhost' on server, but there's no 520 port mentioned
regardless of whether I run the server with or without -cf/-lf.
Comment 4 Jiri Popelka 2010-07-26 07:58:05 EDT
I'm closing this as worksforme because
with 'nmap -A localhost -p 520' or 'ss -lnptu' or 'lsof -i'
I see that dhcpd listens on defined omapi-port
regardless of whether I run the server with or without -cf/-lf.
Comment 5 lejeczek 2010-07-29 04:50:35 EDT
yes, apologies, yes I looked into it when you mentioned it was ok, it's been ok since then, sorry for not posting here