CentOS 7, NSF, “feature”

Home » CentOS » CentOS 7, NSF, “feature”
CentOS 5 Comments

In the last month, we’ve discovered a new, ahhhh, “feature” in the version of the version of NFS with CentOS 7: on startup, if it cannot resolve a given host, it dies. It does not continue on up, with all the other hosts it’s exporting to, and just log a message.

Is there a workaround, or a configuration, to change this “fail on unresolved host” behaviour?

mark

5 thoughts on - CentOS 7, NSF, “feature”

  • Ricardo J. Barberis wrote:

    Good thought, but no – this was an issue where the servers names were changed, or moved – I disremember which. And it came up originally, because we have one server that’s accessed all over campus, at other Institutes, and some people leave, and their machines go away, repurposed or surplused, but they’re still listed on our exports file.

    mark

  • this network-online.target your

    1) Don’t use .include as that’s not recommended and deprecated behaviour. Make an override snippet in /etc/systemd/system/nginx.service.d called custom.conf or network.conf or something. This has the benefit as well of working nicely with systemctl cat and systemd-delta.

    2) You just need a systemctl daemon-reload after this not reenable.

    3) The network targets situation is detailed (and the whys of it) in the systemd.special man page.

  • On my systems, I saw that network.target was not started, because no service required it (“After=foo” is totally useless if there isn’t any “Require=foo” too… Mwokay, why not…). I just added a symlink to force network.target to start, and the ordering problem is solved :
    /etc/systemd/system/multi-user.target.wants/network.target -> /usr/lib/systemd/system/network.target

    That link avoids modifying the configuration of _all_ the services needing a fully working network (ssh, web, mail, snmp, and so on) with a crappy, but easy-to-deploy, one-liner like this (no, I’m not ashamed) :
    # for fic in $(grep -rl “After=.*network.target” /lib/systemd/system | cut -d/ -f5 | grep -v “network-online.target”) ; do [ ! -d “/etc/systemd/system/${fic}.d” ] && mkdir “/etc/systemd/system/${fic}.d” ; echo -e “[Unit]\nAfter=network-online.target” > “/etc/systemd/system/${fic}.d/local-network-online.conf” ; done && systemctl daemon-reload

    By the way, congratulations to the genius who decided to name one of the files “-.slice”… Yes, a filename beginning by a hyphen. I suppose anybody here understands why it’s probably one of the worst ideas he never had.

    Sylvain. Pensez ENVIRONNEMENT : n’imprimer que si ncessaire

LEAVE A COMMENT