Code Monkey home page Code Monkey logo

handyrep's People

Contributors

adunstan avatar josb avatar kaceymiri avatar msroest avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

handyrep's Issues

GUI: Change text sizes

Please shrink the text for the action options (i.e. cluster status, read log, etc.) and enlarge the text for the data itself. Currently the data text is very small and one has to scroll to find it.

manual_failover 404

Servers --> current replica --> manual_failover
Type the name of the replica into the "newmaster" blank.
get 404. The REST function was not activated.
I suspect that the wrong parameter ("servername" instead of "newmaster") may be getting passed.

Read Log should display rows as lines

read_log_lines currently returns a JSON array. These need to be displayed as lines so that the user can read them, one line per array item, probably with a

between.

Improve failover logic on HR restart after network/combination failure

Currently, if HR goes down before the replication master does, or between the last check on the replication master and the time that HR comes back up, HR will be unable to decide whether it is safe to fail over and will not do so with some timings. This is probably the safest route for now, but we should address it in the future in order to cope with "network down" events.

Implement Support for Cascading Replication

Implement support for cascading replication. This would involve:

(a) tracking which server each replica cascades from;
(b) polling that server's pg_stat_replication instead of the master's
(c) auto-remaster when the intermediate master-replica goes down

Docker and handyrep?

What are the plans to containerize handyrep with Docker? Do you plan to accept PRs for it here?

Server status should refresh more often

Currently the status bar at the top seems to only refresh if you change servers. This leads to some odd views if, for example, you just called poll() and you expect to see the results of that poll reflected in status changes.

The status frame should refresh a lot. It's cheap.

Implement Support for Sync Replication

Implement support for synchronous replication. This would involve:

  • Tracking which servers are sync replicas
  • Altering pg.conf for the master to change sync replica config (probably done with include files or conf.d)
  • Offering a timeout for sync replica being down, so that we reset the master as non-sync.

New GUI navigation

So, I'd like to overhaul how GUI navigation works. The way I imagine it is:

  1. User logs in to the Handyrep Server.
  2. get_status?cached results are displayed.
  3. Server names are clickable.
  4. If a server name is clicked, you get get_server_info for that server, plus a list of actions for that server (see below for actions)
  5. Any time the user migrates back to the home page, they get the get_status.

We'd still need navigation for items which have nothing to do with a particular server, probably something like what we have now.

Actions based on server role in a comment once I get done filing other issues.

Disable, Clone of replica through GUI errors out due to wrong parameters being passed

  1. Try to disable the current replica, get:
    Error: Undefined argument: clonefrom
    ... clonefrom is not an argument for disable.
  2. Try to clone a replica, with replicaserver={name}, reclone=True

first, the options presented to the user are wrong. they are:

replicaserver
The new replica to clone to.
Please enter your choice:
reclone
Whether to clone over an existing replica, if any. If set to False (the default), clone will abort if this server has an operational PostgreSQL on it.

replicaserver should be automatically populated based on which server the user is looking at. However, "clonefrom" should not be populated, and should be presented as an option to the user.

Initialization Command

Handyrep should have a seperate initialization command, as well as the resync command. This would be different from resync in the following ways:

  1. It would create the directories it needs (such as wal_archive) if they are not already present.
  2. if run on the replica, it would check that all symlink targets on the master exist on the standby, and error out if they don't before attempting to sync.
  3. it would create handyrep/recovery.conf template based on information in handyrep.conf.
  4. it would copy the master database, possibly using a different method than resync does (such as pg_basebackup instead of rsync).

This is a Chippy request.

clone function returns 404

As discussed on IRC:
using the clone, reclone=True in the GUI returns a 404 regardless of what happens on the server. Due to other stuff, I suspect that the parameters aren't being bassed to the rest interface.

verify_server undefined

/verify_server, params={'server': u''} returns:
{u'Error': u'Undefined function verify_server'}

Can't pass file path parameters through REST UI

Christophe,

reload_conf takes a file path as a parameter. However, this blows up the rest UI; it errors out because of the slashes in the file path. Canonical Flask advice is to use a path variable instead of a string variable, but this would require pretty significant surgery to hdaemon to make it work. Simpler fixes?

Add Plugin for replica provisioning by rsync

We need a clone_rsync plugin as well, which should handle all of the steps required for creating a new replica via start backup, rsync, and stop backup. Should also check that archiving is set up before starting.

poll_master unavailable

/poll_master returns:
{u'Error': u'Undefined function poll_master'}
The API does not suggest that this is unavailable to through the Web API.

Write authentication plugins

We need to support other types of authentication, rather than just an admin and RO password. These would include:

LDAP/AD
PAM
DB Table

This will require:
Moving the authenticate() function to a plugin
writing several plugins

Add option to manage postgresql.conf

Add configuration option and function call to have handyrep push a postgresql.conf include to all servers. In this case, all replication options would be managed from a handyrep template, and would be pushed to handyrep.conf on each machine.

Move host results to a sub-dict, rather than as top level tags.

Right now, in status results, the host names are top-level tags along with other, keyword tags like "result". This is probably a bad idea, since inevitably there will be a conflict.

I'd suggest having a top-level tag called something like "hosts", whose value is a dict of "hostname": status pairs.

Improve barman support for different failover scenrios

In particular, we need to distinguish between the case where we know that the master has shutdown cleanly and we can continue with the same backup series, and the case where we don't know that and so we need to start a new backup series.

resync_replica should check hosts file

When running pg_resync_replica, we should check that pitr-hosts.conf (or handyrep-hosts.conf) is identical on the master server and the current replica. If not, the script should abort.

This is a Chippy request.

User has no way to see two HR conflict error

One reason HR can be unavailable is if you accidentally try to start two instances of HR on the same server. However, if you do that, the REST interface (and the GUI) don't work. So, how does the user retrieve the error message that that's the problem?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.