]> git.proxmox.com Git - pmg-api.git/log
pmg-api.git
7 years agoPMG::Cluster::sync_domainstat_db - use single sql statement with ON CONFLICT
Dietmar Maurer [Sat, 22 Apr 2017 13:44:35 +0000 (15:44 +0200)]
PMG::Cluster::sync_domainstat_db - use single sql statement with ON CONFLICT

7 years agoPMG::Cluster::sync_userprefs_db - rename $update_sth to $merge_sth
Dietmar Maurer [Sat, 22 Apr 2017 09:53:43 +0000 (11:53 +0200)]
PMG::Cluster::sync_userprefs_db - rename $update_sth to $merge_sth

7 years agoPMG::Cluster::sync_greylist_db - prepare outside loop
Dietmar Maurer [Sat, 22 Apr 2017 09:47:20 +0000 (11:47 +0200)]
PMG::Cluster::sync_greylist_db - prepare outside loop

To speedup updates

7 years agoPMG::Cluster::sync_generic_mtime_db - do not cache data in $data
Dietmar Maurer [Sat, 22 Apr 2017 09:42:39 +0000 (11:42 +0200)]
PMG::Cluster::sync_generic_mtime_db - do not cache data in $data

7 years agoPMG::Cluster::sync_userprefs_db - prepare outside loop, use ON CONFLICT
Dietmar Maurer [Sat, 22 Apr 2017 09:31:17 +0000 (11:31 +0200)]
PMG::Cluster::sync_userprefs_db - prepare outside loop, use ON CONFLICT

7 years agoPMG::Cluster::sync_deleted_nodes_from_master - fix $cinfo access
Dietmar Maurer [Fri, 21 Apr 2017 09:52:45 +0000 (11:52 +0200)]
PMG::Cluster::sync_deleted_nodes_from_master - fix $cinfo access

7 years agopmgmirror: implement dartabase syncronization
Dietmar Maurer [Fri, 21 Apr 2017 09:41:55 +0000 (11:41 +0200)]
pmgmirror: implement dartabase syncronization

7 years agoPMG::DBTools::copy_selected_data - correctly substitute $table
Dietmar Maurer [Fri, 21 Apr 2017 09:35:40 +0000 (11:35 +0200)]
PMG::DBTools::copy_selected_data - correctly substitute $table

7 years agoPMG/MailQueue.pm: fix create_spooldirs
Dietmar Maurer [Fri, 21 Apr 2017 07:44:04 +0000 (09:44 +0200)]
PMG/MailQueue.pm: fix create_spooldirs

7 years agoPMG/DBTools.pm: new helper copy_selected_data()
Dietmar Maurer [Fri, 21 Apr 2017 05:36:38 +0000 (07:36 +0200)]
PMG/DBTools.pm: new helper copy_selected_data()

7 years agoPMG/DBTools.pm: add helpers to manipulate clusterinfo table
Dietmar Maurer [Thu, 20 Apr 2017 15:17:53 +0000 (17:17 +0200)]
PMG/DBTools.pm: add helpers to manipulate clusterinfo table

7 years agoPMG::Cluster::sync_master_quar - do not pass $cinfo - not required
Dietmar Maurer [Thu, 20 Apr 2017 07:34:46 +0000 (09:34 +0200)]
PMG::Cluster::sync_master_quar - do not pass $cinfo - not required

7 years agoPMG/API2/Cluster.pm: on join, sync all quarantine files from master
Dietmar Maurer [Thu, 20 Apr 2017 05:20:48 +0000 (07:20 +0200)]
PMG/API2/Cluster.pm: on join, sync all quarantine files from master

7 years agoPMG/Cluster.pm: add rsync helpers to sync quarantine files
Dietmar Maurer [Thu, 20 Apr 2017 05:17:29 +0000 (07:17 +0200)]
PMG/Cluster.pm: add rsync helpers to sync quarantine files

7 years agoPMG/Cluster.pm: implement sync_ruledb_from_master()
Dietmar Maurer [Tue, 18 Apr 2017 09:40:33 +0000 (11:40 +0200)]
PMG/Cluster.pm: implement sync_ruledb_from_master()

7 years agoPMG/DBTools.pm: new helper copy_table()
Dietmar Maurer [Tue, 18 Apr 2017 09:37:42 +0000 (11:37 +0200)]
PMG/DBTools.pm: new helper copy_table()

7 years agoPMG/API2/RuleDB.pm: add API to query ruledb digest
Dietmar Maurer [Tue, 18 Apr 2017 09:36:20 +0000 (11:36 +0200)]
PMG/API2/RuleDB.pm: add API to query ruledb digest

To detect ruledb changes.

7 years agoPMG/RuleCache.pm: fix digest (use correct ordering)
Dietmar Maurer [Tue, 18 Apr 2017 08:47:47 +0000 (10:47 +0200)]
PMG/RuleCache.pm: fix digest (use correct ordering)

7 years agoremove msgquote hack - syslog already work correctly
Dietmar Maurer [Fri, 14 Apr 2017 13:08:28 +0000 (15:08 +0200)]
remove msgquote hack - syslog already work correctly

This was a workaround for a syslog bug, fixed long time ago ...

7 years agoPMG/API2/Cluster.pm: also start/stop pmgmirror on create/join
Dietmar Maurer [Fri, 14 Apr 2017 12:49:03 +0000 (14:49 +0200)]
PMG/API2/Cluster.pm: also start/stop pmgmirror on create/join

7 years agoPMG/Service/pmgmirror.pm: start implementing cluster_sync
Dietmar Maurer [Fri, 14 Apr 2017 09:03:58 +0000 (11:03 +0200)]
PMG/Service/pmgmirror.pm: start implementing cluster_sync

Only copy config for now...

7 years agodebian/postinst: cleanup - use a loop
Dietmar Maurer [Fri, 14 Apr 2017 08:36:11 +0000 (10:36 +0200)]
debian/postinst: cleanup - use a loop

7 years agodebian/postinst: restart pmgmirror when triggered
Dietmar Maurer [Fri, 14 Apr 2017 07:51:02 +0000 (09:51 +0200)]
debian/postinst: restart pmgmirror when triggered

7 years agoPMG/Service/pmgmirror.pm: restart when we detect increased memory usage
Dietmar Maurer [Fri, 14 Apr 2017 07:48:31 +0000 (09:48 +0200)]
PMG/Service/pmgmirror.pm: restart when we detect increased memory usage

7 years agopmgtunnel: cleanup
Dietmar Maurer [Fri, 14 Apr 2017 07:21:49 +0000 (09:21 +0200)]
pmgtunnel: cleanup

7 years agopmgmirror: add dummy for pmgmirror service
Dietmar Maurer [Fri, 14 Apr 2017 07:21:20 +0000 (09:21 +0200)]
pmgmirror: add dummy for pmgmirror service

7 years agobump version to 5.0-5
Dietmar Maurer [Fri, 14 Apr 2017 05:28:47 +0000 (07:28 +0200)]
bump version to 5.0-5

7 years agotemplates/postgresql.conf.in: use config from default installation
Dietmar Maurer [Fri, 14 Apr 2017 05:20:03 +0000 (07:20 +0200)]
templates/postgresql.conf.in: use config from default installation

7 years agotemplates/pg_hba.conf.in; use same config as postgres default installation
Dietmar Maurer [Fri, 14 Apr 2017 05:16:16 +0000 (07:16 +0200)]
templates/pg_hba.conf.in; use same config as postgres default installation

7 years agoPMG/API2/RuleDB.pm: do not use protected for read-only database access
Dietmar Maurer [Fri, 14 Apr 2017 04:56:28 +0000 (06:56 +0200)]
PMG/API2/RuleDB.pm: do not use protected for read-only database access

7 years agoPMG/API2/Rules.pm: proxy delete rule to master
Dietmar Maurer [Fri, 14 Apr 2017 04:55:10 +0000 (06:55 +0200)]
PMG/API2/Rules.pm: proxy delete rule to master

7 years agoPMG/API2/Action.pm: proxy write to master, set protected flag
Dietmar Maurer [Fri, 14 Apr 2017 04:53:28 +0000 (06:53 +0200)]
PMG/API2/Action.pm: proxy write to master, set protected flag

7 years agoPMG/API2/ObjectGroupHelpers.pm: use protected flag for writes
Dietmar Maurer [Fri, 14 Apr 2017 04:50:48 +0000 (06:50 +0200)]
PMG/API2/ObjectGroupHelpers.pm: use protected flag for writes

7 years agoadd postgres user www-data with read-only access to tables
Dietmar Maurer [Fri, 14 Apr 2017 04:34:42 +0000 (06:34 +0200)]
add postgres user www-data with read-only access to tables

7 years agodebian/control: depend on sudo
Dietmar Maurer [Thu, 13 Apr 2017 15:39:35 +0000 (17:39 +0200)]
debian/control: depend on sudo

This is convenient to run postgres database commands as user postgres.

7 years agopmgtunnel: use UPD socket, only root is allowed to access the socket
Dietmar Maurer [Thu, 13 Apr 2017 15:08:52 +0000 (17:08 +0200)]
pmgtunnel: use UPD socket, only root is allowed to access the socket

7 years agocreate and use postgres user 'root' to improve security
Dietmar Maurer [Thu, 13 Apr 2017 11:06:05 +0000 (13:06 +0200)]
create and use postgres user 'root' to improve security

7 years agoPMG/API2/Services.pm: add postgres to service list
Dietmar Maurer [Thu, 13 Apr 2017 05:00:23 +0000 (07:00 +0200)]
PMG/API2/Services.pm: add postgres to service list

7 years agoPMG/API2/Cluster.pm: add a separate status API
Dietmar Maurer [Thu, 13 Apr 2017 04:25:11 +0000 (06:25 +0200)]
PMG/API2/Cluster.pm: add a separate status API

7 years agoPMG/API2/Cluster.pm: allways convert exceptions object to strings
Dietmar Maurer [Wed, 12 Apr 2017 10:21:04 +0000 (12:21 +0200)]
PMG/API2/Cluster.pm: allways convert exceptions object to strings

Else the API result verification fails.

7 years agopmgcm: use correct formula to compute disk percentage
Dietmar Maurer [Wed, 12 Apr 2017 10:20:11 +0000 (12:20 +0200)]
pmgcm: use correct formula to compute disk percentage

7 years agoAPI get /config/cluster/nodes: inlude node status from other cluster members
Dietmar Maurer [Wed, 12 Apr 2017 08:39:16 +0000 (10:39 +0200)]
API get /config/cluster/nodes: inlude node status from other cluster members

7 years agoPMG/API2/Nodes.pm: add node status API
Dietmar Maurer [Wed, 12 Apr 2017 05:44:28 +0000 (07:44 +0200)]
PMG/API2/Nodes.pm: add node status API

7 years agoPMG::DBTools::cluster_sync_status - new helper
Dietmar Maurer [Wed, 12 Apr 2017 05:42:25 +0000 (07:42 +0200)]
PMG::DBTools::cluster_sync_status -  new helper

7 years agoAPI get /nodes: list all nodes
Dietmar Maurer [Wed, 12 Apr 2017 05:08:20 +0000 (07:08 +0200)]
API get /nodes: list all nodes

7 years agopmgsh: use new PMG::RESTEnvironment
Dietmar Maurer [Wed, 12 Apr 2017 05:07:31 +0000 (07:07 +0200)]
pmgsh: use new PMG::RESTEnvironment

7 years agoPMG/API2/Cluster.pm: stop/start pmgtunnel at create/join
Dietmar Maurer [Wed, 12 Apr 2017 04:10:15 +0000 (06:10 +0200)]
PMG/API2/Cluster.pm: stop/start pmgtunnel at create/join

7 years agoPMG::Cluster::sync_config_from_master - try to use HostKeyAlias when possible
Dietmar Maurer [Tue, 11 Apr 2017 15:20:29 +0000 (17:20 +0200)]
PMG::Cluster::sync_config_from_master - try to use HostKeyAlias when possible

7 years agoPMG/DBTools.pm: use HostKeyAlias for ssh connection
Dietmar Maurer [Tue, 11 Apr 2017 15:09:41 +0000 (17:09 +0200)]
PMG/DBTools.pm: use HostKeyAlias for ssh connection

7 years agoPMG/Service/pmgtunnel.pm: use HostKeyAlias
Dietmar Maurer [Tue, 11 Apr 2017 15:01:02 +0000 (17:01 +0200)]
PMG/Service/pmgtunnel.pm: use HostKeyAlias

7 years agoPMG/Service/pmgtunnel.pm: avoid use of $cinfo->{remnodes}
Dietmar Maurer [Tue, 11 Apr 2017 14:49:49 +0000 (16:49 +0200)]
PMG/Service/pmgtunnel.pm: avoid use of $cinfo->{remnodes}

7 years agobin/pmgtunnel: new service to tunnel database connections
Dietmar Maurer [Tue, 11 Apr 2017 14:41:02 +0000 (16:41 +0200)]
bin/pmgtunnel: new service to tunnel database connections

7 years agoPMG::Cluster::sync_config_from_master - print note when local node is master
Dietmar Maurer [Tue, 11 Apr 2017 05:53:08 +0000 (07:53 +0200)]
PMG::Cluster::sync_config_from_master - print note when local node is master

7 years agopmgcm: add 'sync' command
Dietmar Maurer [Tue, 11 Apr 2017 05:33:50 +0000 (07:33 +0200)]
pmgcm: add 'sync' command

7 years agoPMG/DBTools.pm: new helper get_remote_time
Dietmar Maurer [Tue, 11 Apr 2017 05:32:53 +0000 (07:32 +0200)]
PMG/DBTools.pm: new helper get_remote_time

7 years agoPMG/Cluster.pm: use PMG::Utils::run_silent_cmd for ssh-keygen
Dietmar Maurer [Tue, 11 Apr 2017 04:53:30 +0000 (06:53 +0200)]
PMG/Cluster.pm: use PMG::Utils::run_silent_cmd for ssh-keygen

7 years agoPMG/API2/Cluster.pm: avoid call to PVE::INotify::read_file
Dietmar Maurer [Tue, 11 Apr 2017 04:45:20 +0000 (06:45 +0200)]
PMG/API2/Cluster.pm: avoid call to PVE::INotify::read_file

7 years agocorrectly initialize PMG::RESTEnvironment in CLI tools.
Dietmar Maurer [Tue, 11 Apr 2017 04:42:40 +0000 (06:42 +0200)]
correctly initialize PMG::RESTEnvironment in CLI tools.

7 years agobump version to 5.0-4
Dietmar Maurer [Mon, 10 Apr 2017 10:32:47 +0000 (12:32 +0200)]
bump version to 5.0-4

7 years agouse remove_tree instead of rmtree
Dietmar Maurer [Mon, 10 Apr 2017 10:02:28 +0000 (12:02 +0200)]
use remove_tree instead of rmtree

Note: parameter for rmtree are interpreted differently,
so old code did not work.

7 years agoPMG/API2/Cluster.pm: set protected flag
Dietmar Maurer [Mon, 10 Apr 2017 09:52:04 +0000 (11:52 +0200)]
PMG/API2/Cluster.pm: set protected flag

7 years agoPMG/API2/Cluster.pm: improve cluster join
Dietmar Maurer [Mon, 10 Apr 2017 08:57:32 +0000 (10:57 +0200)]
PMG/API2/Cluster.pm: improve cluster join

7 years agoPMG/DBTools.pm: add helpers for database synchronization
Dietmar Maurer [Mon, 10 Apr 2017 08:56:44 +0000 (10:56 +0200)]
PMG/DBTools.pm: add helpers for database synchronization

7 years agoPMG::Config::rewrite_config() - add force_restart option
Dietmar Maurer [Mon, 10 Apr 2017 08:54:49 +0000 (10:54 +0200)]
PMG::Config::rewrite_config() - add force_restart option

7 years agoPMG/Cluster.pm: improve sync_config_from_master
Dietmar Maurer [Mon, 10 Apr 2017 08:53:13 +0000 (10:53 +0200)]
PMG/Cluster.pm: improve sync_config_from_master

7 years agouse correct method to read csrf token ($read_csrf_secret)
Dietmar Maurer [Mon, 10 Apr 2017 06:48:48 +0000 (08:48 +0200)]
use correct method to read csrf token ($read_csrf_secret)

7 years agoPMG/Ticket.pm: use inotify to read keys
Dietmar Maurer [Fri, 7 Apr 2017 14:31:37 +0000 (16:31 +0200)]
PMG/Ticket.pm: use inotify to read keys

So that we detect key changes automatically.

7 years agoPMG/Ticket.pm: remove debug code
Dietmar Maurer [Fri, 7 Apr 2017 13:29:43 +0000 (15:29 +0200)]
PMG/Ticket.pm: remove debug code

7 years agoPMG/Cluster.pm: new helpers update_ssh_keys and sync_config_from_master
Dietmar Maurer [Fri, 7 Apr 2017 13:00:32 +0000 (15:00 +0200)]
PMG/Cluster.pm: new helpers update_ssh_keys and sync_config_from_master

7 years agoPMG/Cluster.pm: cleanups
Dietmar Maurer [Fri, 7 Apr 2017 07:53:23 +0000 (09:53 +0200)]
PMG/Cluster.pm: cleanups

7 years agoPMG/API2/Cluster.pm: complete cluster create, run as background task
Dietmar Maurer [Fri, 7 Apr 2017 06:32:01 +0000 (08:32 +0200)]
PMG/API2/Cluster.pm: complete cluster create, run as background task

7 years agomove get_full_service_state to PMG::Utils
Dietmar Maurer [Fri, 7 Apr 2017 05:02:12 +0000 (07:02 +0200)]
move get_full_service_state to PMG::Utils

7 years agoPMG/API2/Cluster.pm: write local cluster config after join
Dietmar Maurer [Thu, 6 Apr 2017 14:56:10 +0000 (16:56 +0200)]
PMG/API2/Cluster.pm: write local cluster config after join

7 years agoPMG/API2/Cluster.pm: add test if ip or name are already used
Dietmar Maurer [Thu, 6 Apr 2017 14:44:16 +0000 (16:44 +0200)]
PMG/API2/Cluster.pm: add test if ip or name are already used

7 years agoimplement cluster join - first version
Dietmar Maurer [Thu, 6 Apr 2017 14:32:43 +0000 (16:32 +0200)]
implement cluster join - first version

7 years agodepend on libpve-apiclient-perl
Dietmar Maurer [Thu, 6 Apr 2017 08:27:31 +0000 (10:27 +0200)]
depend on libpve-apiclient-perl

7 years agopmgcm.pm: improve API description
Dietmar Maurer [Thu, 6 Apr 2017 08:00:58 +0000 (10:00 +0200)]
pmgcm.pm: improve API description

7 years agopmgcm join_cmd: new helper
Dietmar Maurer [Thu, 6 Apr 2017 07:56:31 +0000 (09:56 +0200)]
pmgcm join_cmd: new helper

7 years agopmgcm: better output if local node is not part of a cluster
Dietmar Maurer [Thu, 6 Apr 2017 07:30:17 +0000 (09:30 +0200)]
pmgcm: better output if local node is not part of a cluster

7 years agorenamed: PMG/API2/ClusterConfig.pm -> PMG/API2/Cluster.pm, add join API
Dietmar Maurer [Thu, 6 Apr 2017 06:15:22 +0000 (08:15 +0200)]
renamed: PMG/API2/ClusterConfig.pm -> PMG/API2/Cluster.pm, add join API

7 years agoalso cache user config inside PMG::RESTEnvironment
Dietmar Maurer [Thu, 6 Apr 2017 05:46:18 +0000 (07:46 +0200)]
also cache user config inside PMG::RESTEnvironment

7 years agocorrectly use PMG::RESTEnvironment->get()
Dietmar Maurer [Thu, 6 Apr 2017 05:25:16 +0000 (07:25 +0200)]
correctly use PMG::RESTEnvironment->get()

7 years agoPMG/HTTPServer.pm: add safety check for master node
Dietmar Maurer [Thu, 6 Apr 2017 05:17:55 +0000 (07:17 +0200)]
PMG/HTTPServer.pm: add safety check for master node

We want to verify that we are on the master node.

7 years agoPMG/RESTEnvironment.pm: add RESTEnvironment class
Dietmar Maurer [Thu, 6 Apr 2017 05:03:00 +0000 (07:03 +0200)]
PMG/RESTEnvironment.pm: add RESTEnvironment class

7 years agodebian/postinst: try to correctly restart services on first install, cleanups
Dietmar Maurer [Wed, 5 Apr 2017 09:26:25 +0000 (11:26 +0200)]
debian/postinst: try to correctly restart services on first install, cleanups

7 years agoPMG/CLI/pmgconfig.pm: remove unused code
Dietmar Maurer [Wed, 5 Apr 2017 09:08:28 +0000 (11:08 +0200)]
PMG/CLI/pmgconfig.pm: remove unused code

7 years agobump version to 5.0-3
Dietmar Maurer [Wed, 5 Apr 2017 08:27:31 +0000 (10:27 +0200)]
bump version to 5.0-3

7 years agoPMG/API2/Services.pm: use rsyslog instead of syslog
Dietmar Maurer [Wed, 5 Apr 2017 05:48:42 +0000 (07:48 +0200)]
PMG/API2/Services.pm: use rsyslog instead of syslog

7 years agoPMG/API2/Services.pm: use 'ssh' instead of 'sshd'
Dietmar Maurer [Wed, 5 Apr 2017 05:45:24 +0000 (07:45 +0200)]
PMG/API2/Services.pm: use 'ssh' instead of 'sshd'

7 years agobin/pmgcm: start cluster management toolkit + API
Dietmar Maurer [Tue, 4 Apr 2017 09:11:15 +0000 (11:11 +0200)]
bin/pmgcm: start cluster management toolkit + API

7 years agoPMG/API2/Nodes.pm: add service parameter to syslog
Dietmar Maurer [Tue, 4 Apr 2017 04:11:27 +0000 (06:11 +0200)]
PMG/API2/Nodes.pm: add service parameter to syslog

7 years agodepend on pmg-docs, make /usr/share/pmg-docs/ accessible via https
Dietmar Maurer [Mon, 3 Apr 2017 13:28:50 +0000 (15:28 +0200)]
depend on pmg-docs, make /usr/share/pmg-docs/ accessible via https

7 years agoPMG/API2/Postfix.pm: improve postfix API, implement postcat
Dietmar Maurer [Mon, 3 Apr 2017 05:28:39 +0000 (07:28 +0200)]
PMG/API2/Postfix.pm: improve postfix API, implement postcat

7 years agoadd some postfix maintainance API calls
Dietmar Maurer [Sun, 2 Apr 2017 11:02:55 +0000 (13:02 +0200)]
add some postfix maintainance API calls

7 years agoPMG::Postfix::mailq - implement paging
Dietmar Maurer [Sun, 2 Apr 2017 09:03:08 +0000 (11:03 +0200)]
PMG::Postfix::mailq - implement paging

7 years agoPMG/API2/Postfix.pm: allow arbitrary text filters
Dietmar Maurer [Sun, 2 Apr 2017 06:58:35 +0000 (08:58 +0200)]
PMG/API2/Postfix.pm: allow arbitrary text filters

And match sender and receiver.

7 years agoPMG/API2/Postfix.pm: add API for mailq
Dietmar Maurer [Sat, 1 Apr 2017 12:18:24 +0000 (14:18 +0200)]
PMG/API2/Postfix.pm: add API for mailq

7 years agoinstall missing package files
Dietmar Maurer [Sat, 1 Apr 2017 12:11:38 +0000 (14:11 +0200)]
install missing package files

7 years agoPMG/Postfix.pm: implement mailq (but we use postqueue directly)
Dietmar Maurer [Sat, 1 Apr 2017 11:39:51 +0000 (13:39 +0200)]
PMG/Postfix.pm: implement mailq (but we use postqueue directly)

and start postfix API

7 years agoPMG/Postfix.pm: add command to parse qshape output
Dietmar Maurer [Sat, 1 Apr 2017 11:01:55 +0000 (13:01 +0200)]
PMG/Postfix.pm: add command to parse qshape output