Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
snf-ganeti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
itminedu
snf-ganeti
Commits
fee9556c
Commit
fee9556c
authored
17 years ago
by
Iustin Pop
Browse files
Options
Downloads
Patches
Plain Diff
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
Loading
Loading
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/config.py
+9
-0
9 additions, 0 deletions
lib/config.py
with
9 additions
and
0 deletions
lib/config.py
+
9
−
0
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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment