dhcp: ignore hostname when invalid

The hostname used for DHCP can be the one obtained from the hostnamed
service and is not guaranteed to be valid, at least with systemd
239. Instead of sending an invalid DHCP option to the server or
failing due to later checks in clients, ignore the hostname and log a
warning when it is invalid.

https://bugzilla.redhat.com/show_bug.cgi?id=1744427
18 jobs for bg/dhcp-invalid-hostname in 44 minutes and 18 seconds (queued for 1 minute and 20 seconds)
latest
Status Job ID Name Coverage
  Test
passed #765885
allowed to fail
checkpatch

00:01:25

manual #765891
allowed to fail manual
t_centos:7.5.1804
passed #765892
t_centos:7.6.1810

00:25:21

passed #765898
t_debian:10

00:15:15

passed #765897
t_debian:9

00:20:40

passed #765900
t_debian:sid

00:20:35

manual #765899
allowed to fail manual
t_debian:testing
manual #765886
allowed to fail manual
t_fedora:28
passed #765887
t_fedora:29

00:36:49

passed #765888
t_fedora:30

00:29:40

passed #765889
t_fedora:31

00:28:01

manual #765890
allowed to fail manual
t_fedora:rawhide
passed #765893
t_ubuntu:16.04

00:19:09

passed #765894
t_ubuntu:18.04

00:21:47

manual #765896
allowed to fail manual
t_ubuntu:devel
manual #765895
allowed to fail manual
t_ubuntu:rolling
 
  External
failed https://desktopqe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/beaker-NetworkManager-gitlab-trigger-code-upstream/822/

failed https://desktopqe-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/beaker-NetworkManager-gitlab-trigger-code-upstream/822/

04:52:20