The error can occur if master node aperates slowly.
In this case it can execute code from
nailgun/nailgun/utils/logs.py
# rename bootstrap directory into fqdn
if os.path.islink(old): logger.debug("Old %s exists and it is link. " "Trying to unlink", old) os.unlink(old)
if os.path.isdir(old): logger.debug("Old %s exists and it is directory. " "Trying to rename into %s", old, new) os.rename(old, new)
else: logger.debug("Creating %s", new) os.makedirs(new)
# creating symlinks
for l in links:
if os.path.islink(l) or os.path.isfile(l): logger.debug("%s already exists. " "Trying to unlink", l) os.unlink(l)
if os.path.isdir(l): logger.debug("%s already exists and it directory. " "Trying to remove", l) shutil.rmtree(l)
---------------------
Then syslog server continues receiving messaqges from node, it recreates missing <ip>/bootstrap directory and writes some files there. Then nailgun process continues
------------------------ logger.debug("Creating symlink %s -> %s", l, new) os.symlink(objects.Node.get_node_fqdn(node), l) <<<<<<<<<<<<<<< error!
Here is root cause analysis from duplicate bug:
The error can occur if master node aperates slowly.
In this case it can execute code from
nailgun/ nailgun/ utils/logs. py
# rename bootstrap directory into fqdn islink( old):
logger. debug(" Old %s exists and it is link. "
"Trying to unlink", old)
os.unlink( old)
logger. debug(" Old %s exists and it is directory. "
"Trying to rename into %s", old, new)
os.rename( old, new)
logger. debug(" Creating %s", new)
os.makedirs( new)
if os.path.
if os.path.isdir(old):
else:
# creating symlinks
logger. debug(" %s already exists. "
"Trying to unlink", l)
os. unlink( l)
logger. debug(" %s already exists and it directory. "
"Trying to remove", l)
shutil. rmtree( l) ------- ------- ------- ------- ---
logger. debug(" Creating symlink %s -> %s", l, new)
os.symlink( objects. Node.get_ node_fqdn( node), l) <<<<<<<<<<<<<<< error!
for l in links:
if os.path.islink(l) or os.path.isfile(l):
if os.path.isdir(l):
-------
Then syslog server continues receiving messaqges from node, it recreates missing <ip>/bootstrap directory and writes some files there. Then nailgun process continues
-------