add 'save config' button, fix save config

Bug #277899 reported by Jehiah
2
Affects Status Importance Assigned to Milestone
txLoadBalancer
Fix Committed
Wishlist
Duncan McGreggor

Bug Description

This fix adds a 'save config' option to the web interface as an alternative use instead of the 'save config' checker. This allows for uses (like mine of course) which requires the ability to save through-the-web config changes, but also to edit the config file for larger changes which get applied all at once by restarting the application.

This also adds a web accessable view of the running config xml via /running.xml (like pydir had),

It also fixes a problem with deleting a host not being reflected in the saved config. (This change also resolves some config file inconsistencies that could have happen when adding an existing ip with a new name by disallowing that)

Related branches

Changed in txloadbalancer:
assignee: nobody → oubiwann
importance: Undecided → Wishlist
status: New → In Progress
Jehiah (jehiah)
Changed in txloadbalancer:
status: In Progress → Incomplete
Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Hey Jehiah,

I've marked this bug as "In Progress" since it's being currently worked on. Let's not use the "Incomplete" status until it's necessary (after a fix has been purported and then proven to not provide everything needed).

Changed in txloadbalancer:
status: Incomplete → In Progress
Revision history for this message
Jehiah (jehiah) wrote :

rev 206 and 208 in my branch should complete this bug fix (unless i figure out ways to setup tests for the admin interface)

http://bazaar.launchpad.net/~jehiah/txloadbalancer/bugfix-1.2/revision/209
http://bazaar.launchpad.net/~jehiah/txloadbalancer/bugfix-1.2/revision/206

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Jehiah,

I finally had a chance to look at these changes tonight; in your branch, I did the following:
  bzr diff -r205..206
  bzr diff -r208..209

For the most part, it looks great -- thanks! There are some minor formatting issues (lines need to be shorter that 80 chars, placeholder docstrings were removed, etc.) and I'm going to unify the saveConfig that you wrote and the one that already exists (implicitly) in manager.checker.checkConfigChanges.

There's a good chance I will get to this within the next couple of days.

Thanks again!

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

Good news! I just pushed this with r212 on trunk.

Jehaih, I didn't commit the following:

     def addHost(self, name, ip, weight=1):
- self.hosts[name] = HostConfig(name, ip, weight)
-
+ ## check that the ip is not alrady in our list
+ newHost = HostConfig(name, ip, weight) ##create the host first so we compare the ascii ip not the unicode ip
+ for host in self.hosts.values():
+ if newHost.ip == host.ip:
+ return False
+ self.hosts[name] = newHost
+ return True

Could you create a new ticket that more fully describes the issue this address, with some info on exactly how to duplicate the issue? Thanks!

Changed in txloadbalancer:
status: In Progress → Fix Committed
Revision history for this message
Stella (skazansk) wrote :

We used txLoadBalancer-1.1.0.patched-py2.4 and recently switched to python 2.6.
Our current txlb version does not have Jehiah's change for saving config. Is there any download-able patched python 2.6 txlb version ?
Thanks

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.