Log strerror(errno) when rrd_mkdir_p() fails in order to know what went wrong
from a client application perspective.
In this particular case, rrd_mkdir_p failed due to the lack of inodes.
Sending a message with 'No Space left on device' allowed the application
to limit the logs in the code in charge of handling the
RRDTOOL_FILESYSTEM_FULL error, rather than flooding the logs with all
the failed queries.
goto done;
}
if (rrd_mkdir_p(dir, 0755) != 0) {
- rc = send_response(sock, RESP_ERR, "Cannot create: %s\n", dir);
+ rc = send_response(sock, RESP_ERR, "Cannot create %s: %s\n",
+ dir, strerror(errno));
pthread_mutex_unlock(&rrdfilecreate_lock);
goto done;
}