Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
fee9556c
Commit
fee9556c
authored
Aug 03, 2007
by
Iustin Pop
Browse files
Re-stat the config file when we write it so that the next _OpenConfig()
won't reread it if not modified by someone else.
parent
a0c3fea1
Changes
1
Hide whitespace changes
Inline
Side-by-side
lib/config.py
View file @
fee9556c
...
...
@@ -545,6 +545,15 @@ class ConfigWriter:
f
.
close
()
# we don't need to do os.close(fd) as f.close() did it
os
.
rename
(
name
,
destination
)
# re-set our cache as not to re-read the config file
try
:
st
=
os
.
stat
(
destination
)
except
OSError
,
err
:
raise
errors
.
ConfigurationError
,
"Can't stat config file: %s"
%
err
self
.
_config_time
=
st
.
st_mtime
self
.
_config_size
=
st
.
st_size
self
.
_config_inode
=
st
.
st_ino
# and redistribute the config file
self
.
_DistributeConfig
()
def
InitConfig
(
self
,
node
,
primary_ip
,
secondary_ip
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment