Comment 4 for bug 1693122

Revision history for this message
Nish Aravamudan (nacc) wrote : Re: [Bug 1693122] Re: mongodb starts before network on VM and standalone

On 01.06.2017 [00:22:44 -0000], Luca Cervigni wrote:
> I mean, it is a database service and 99% of the times can be, or it is used from the network.
> In the mongodb configuration mongodb.conf:
>
> ...
> #Net
> net.bindIp: 127.0.0.1,10.4.78.23
> net.port: 27017
> ...

That is a change you made in your local configuration, correct? By
default, mongodb listens on localhost only.

> The db tries to start binding on the 10.4.78.23 ip, that is still not up
> because there is no hierarchy set up when mongodb starts. The default
> startup process in systemd is managed by the package and therefore this
> change is probably to be done by your side. MongoDB is a database server
> and therefore need to be accessible from the network.

So you made a change to your local configuration without finishing the
change in the systemd service, afaict. It is expected that you will do
the systemd change you mentioned. Similar to if you change where the
database is stored, and that is on some systemd-managed mountpoint, you
might need to wait on that unit as well.

All that being said, MySQL seems to have made this change to their
service file, so there is precedence. I will place this on the server
backlog.

> In my case, the mongodb database is used on three standalone VMs to
> support the monitoring of an Openstack installation.

I think the right approach to this is probably to ask Debian if they
would consider changing the systemd file in the source package. Would
you be willing to file the bug there?