Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions 16 systemvm/debian/opt/cloud/bin/cs/CsDhcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,15 +49,21 @@ def process(self):
self.add(self.dbag[item])
self.write_hosts()

if self.cloud.is_changed():
self.delete_leases()

self.configure_server()

restart_dnsmasq = self.conf.commit()
self.cloud.commit()
restart_dnsmasq = False

if self.conf.commit():
restart_dnsmasq = True

if self.cloud.commit():
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

repeat 2 times commit, why?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@resmo The commit is called on two different files, it's the same old code refactored differently.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see conf.commit and cloud.commit. Those are two different objects, @resmo . How is this suspect?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I missed that. never mind.

restart_dnsmasq = True

self.dhcp_opts.commit()

if restart_dnsmasq:
self.delete_leases()

if not self.cl.is_redundant() or self.cl.is_master():
if restart_dnsmasq:
CsHelper.service("dnsmasq", "restart")
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.