]> git.proxmox.com Git - librados2-perl.git/log
librados2-perl.git
8 months agobump version to 1.4.1 master
Wolfgang Bumiller [Fri, 11 Aug 2023 07:06:08 +0000 (09:06 +0200)]
bump version to 1.4.1

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
8 months agouse POSIX::_exit instead of exit in forked child
Fiona Ebner [Tue, 8 Aug 2023 11:23:12 +0000 (13:23 +0200)]
use POSIX::_exit instead of exit in forked child

This avoids calling the END blocks and destructor routines most of
which have nothing to do with the fork, so it cannot be assumed to be
safe to do from the fork.

Move the call to pve_rados_shutdown from the destructor routine,
which will not be called by the child anymore. Make sure the cleanup
is also done when the worker dies.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
8 months agoreset inherited signal handlers in child worker
Fiona Ebner [Tue, 8 Aug 2023 11:23:11 +0000 (13:23 +0200)]
reset inherited signal handlers in child worker

For example, if pvestatd is the parent, the inherited signal handlers
from pvestatd, i.e. PVE/Daemon.pm's handlers would be invoked by the
child.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
8 months agorefactor pverados worker into dedicated function
Fiona Ebner [Tue, 8 Aug 2023 11:23:10 +0000 (13:23 +0200)]
refactor pverados worker into dedicated function

No functional change intended.

Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
11 months agobuildsys: expand clean target
Thomas Lamprecht [Mon, 8 May 2023 12:22:33 +0000 (14:22 +0200)]
buildsys: expand clean target

& drop the odd find command execution, just fix your editor to not
sprinkle random files all over the (source) place.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/source/format: document that this is a 3.0 (native) source
Thomas Lamprecht [Mon, 8 May 2023 12:22:22 +0000 (14:22 +0200)]
d/source/format: document that this is a 3.0 (native) source

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobuildsys: switch upload dist to bookworm
Thomas Lamprecht [Thu, 4 May 2023 15:22:45 +0000 (17:22 +0200)]
buildsys: switch upload dist to bookworm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agobump version to 1.4.0
Thomas Lamprecht [Thu, 4 May 2023 14:30:38 +0000 (16:30 +0200)]
bump version to 1.4.0

and switch to native versioning, this perl binding comes from us
(Proxmox) after all

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/copyright: update years
Thomas Lamprecht [Thu, 4 May 2023 14:30:33 +0000 (16:30 +0200)]
d/copyright: update years

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
11 months agod/control: define compat level via build-depends and raise to 13
Thomas Lamprecht [Thu, 4 May 2023 14:30:06 +0000 (16:30 +0200)]
d/control: define compat level via build-depends and raise to 13

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agobump version to 1.3-1
Thomas Lamprecht [Thu, 17 Nov 2022 13:56:47 +0000 (14:56 +0100)]
bump version to 1.3-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agod/triggers: activate a pve-api-updates
Thomas Lamprecht [Thu, 17 Nov 2022 14:14:14 +0000 (15:14 +0100)]
d/triggers: activate a pve-api-updates

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agocreate new mon_cmd method for new behavior with compat wrapper
Thomas Lamprecht [Thu, 17 Nov 2022 13:23:50 +0000 (14:23 +0100)]
create new mon_cmd method for new behavior with compat wrapper

Rename the $noerr param to $no_result_catch while changing the method
name, as it was a bit confusing because we only ever adhere to it for
the actual command result, not other die's.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoavoid one-argument "bless"
Thomas Lamprecht [Thu, 17 Nov 2022 13:17:53 +0000 (14:17 +0100)]
avoid one-argument "bless"

can be pretty confusing because if we ever would add a subclass
basing on this module it would get the parent as class and thus the
method calls would not be overridable

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agoupdate POD
Thomas Lamprecht [Thu, 17 Nov 2022 13:17:19 +0000 (14:17 +0100)]
update POD

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agocleanup use statements and drop unused exporter
Thomas Lamprecht [Thu, 17 Nov 2022 13:16:27 +0000 (14:16 +0100)]
cleanup use statements and drop unused exporter

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
17 months agomon_command: optionally ignore errors
Aaron Lauterer [Fri, 25 Mar 2022 10:55:05 +0000 (11:55 +0100)]
mon_command: optionally ignore errors

In some situations we do not want to abort if the Ceph API returns an
error. For example if we run the 'osd ok-to-stop' or similar calls, we
are interested in the status message in the error case.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
17 months agomon_command: refactor to pass all data to perl
Aaron Lauterer [Fri, 25 Mar 2022 10:55:04 +0000 (11:55 +0100)]
mon_command: refactor to pass all data to perl

By passing back all return values from the Ceph API (RADOS.xs) to Perl
we are more flexible to make more than just the data available further
up the stack. These values are:

* return code
* status message (can contain useful information)
* data

The Ceph API interaction happens in a child process. We need to en- and
decode the returned hash in JSON to pass it between the child and parent
process.

RADOS.pm::mon_command now returns not just the data, but all information
as a hash ref.  Therefore dependent packages (pve-manager, pve-storage)
need to adapt.

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agoradocs mon command: fix indentation style-mix
Thomas Lamprecht [Mon, 21 Feb 2022 15:21:29 +0000 (16:21 +0100)]
radocs mon command: fix indentation style-mix

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomon command: fix calling free() code style-mix
Thomas Lamprecht [Mon, 21 Feb 2022 15:14:41 +0000 (16:14 +0100)]
mon command: fix calling free() code style-mix

the error case checked for nullness on outbuf but not outs, while the
normal code path did the exact reverse, which is rather confusing for
any reader, as they could think there's something implied by this.

There isn't and rados' rados_buffer_free is already having its own
non-null check, not that it would matter much to call free with null
anyway.., but always using the rados provided method ensures tracing
shows the free, which could be good on debugging..

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agomon_command: free outs buffer
Aaron Lauterer [Fri, 18 Feb 2022 11:38:22 +0000 (12:38 +0100)]
mon_command: free outs buffer

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
2 years agobump version to 1.2-1
Thomas Lamprecht [Thu, 20 May 2021 12:41:32 +0000 (14:41 +0200)]
bump version to 1.2-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: change upload dist to bullseye
Thomas Lamprecht [Thu, 20 May 2021 12:38:30 +0000 (14:38 +0200)]
buildsys: change upload dist to bullseye

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: fix librbd linkage
Thomas Lamprecht [Thu, 20 May 2021 12:28:05 +0000 (14:28 +0200)]
buildsys: fix librbd linkage

I really hate such compiler quirks change behavior... -.-

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: update CFLAGS
Thomas Lamprecht [Thu, 20 May 2021 12:26:43 +0000 (14:26 +0200)]
buildsys: update CFLAGS

better split to different lines, add comment why we override those in
the first place and enable the -Wstack-protector-strong and -Wformat
checks

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2 years agobuildsys: consistent makefile variable parenthesis
Thomas Lamprecht [Thu, 20 May 2021 12:39:25 +0000 (14:39 +0200)]
buildsys: consistent makefile variable parenthesis

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 years agomon_command: include prefix in error message
Thomas Lamprecht [Fri, 5 Jun 2020 10:04:53 +0000 (12:04 +0200)]
mon_command: include prefix in error message

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 1.1-2
Thomas Lamprecht [Mon, 24 Jun 2019 16:25:11 +0000 (18:25 +0200)]
bump version to 1.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: drop unused CFLAGS line
Thomas Lamprecht [Tue, 18 Jun 2019 14:05:16 +0000 (16:05 +0200)]
buildsys: drop unused CFLAGS line

it got overwritten the line afterwards

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix read after string end
Dominik Csapak [Tue, 18 Jun 2019 12:24:07 +0000 (14:24 +0200)]
fix read after string end

outs is not a zero-terminated string but has its length given by
outslen, so use that (with a maximum of the size of msg)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobuildsys: switch upload dist over to buster
Thomas Lamprecht [Tue, 21 May 2019 17:39:43 +0000 (19:39 +0200)]
buildsys: switch upload dist over to buster

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 1.1-1
Thomas Lamprecht [Tue, 21 May 2019 17:39:24 +0000 (19:39 +0200)]
bump version to 1.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoset debian source format to 1.0
Thomas Lamprecht [Tue, 21 May 2019 17:38:01 +0000 (19:38 +0200)]
set debian source format to 1.0

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobuildsys: use dpkg-dev makefile helpers for pkg info
Thomas Lamprecht [Tue, 21 May 2019 17:34:09 +0000 (19:34 +0200)]
buildsys: use dpkg-dev makefile helpers for pkg info

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobump version 1.0-6
Thomas Lamprecht [Mon, 7 Jan 2019 12:44:36 +0000 (13:44 +0100)]
bump version 1.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agoAdd missing Build-Depends
Rhonda D'Vine [Fri, 28 Dec 2018 09:34:25 +0000 (10:34 +0100)]
Add missing Build-Depends

Also use https for the homepage while in there already.

Signed-off-by: Rhonda D'Vine <rhonda@proxmox.com>
5 years agobuild: use a common BUILDSRC target for dsc and deb
Wolfgang Bumiller [Tue, 11 Dec 2018 09:42:53 +0000 (10:42 +0100)]
build: use a common BUILDSRC target for dsc and deb

And use $(PACKAGE)-$(VERSION) instead of 'build/' as
directory name, as it is also what the source package's
tarball ends up with inside.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
5 years agobsys: fix git HEAD parse to reflect actual build commit
Thomas Lamprecht [Mon, 10 Dec 2018 16:42:32 +0000 (17:42 +0100)]
bsys: fix git HEAD parse to reflect actual build commit

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobsys: add dsc target
Thomas Lamprecht [Mon, 10 Dec 2018 16:42:31 +0000 (17:42 +0100)]
bsys: add dsc target

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agod/control: use variable depends
Thomas Lamprecht [Mon, 10 Dec 2018 16:42:30 +0000 (17:42 +0100)]
d/control: use variable depends

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agobsys: move to dpkg-buildpackage
Thomas Lamprecht [Mon, 10 Dec 2018 16:42:29 +0000 (17:42 +0100)]
bsys: move to dpkg-buildpackage

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
5 years agofix #1950: use /etc/pve/ceph.conf as default
Tim Marx [Mon, 10 Dec 2018 11:52:28 +0000 (12:52 +0100)]
fix #1950: use /etc/pve/ceph.conf as default

If there is no symlink between '/etc/ceph/ceph.conf -> /etc/pve/ceph.conf',
executing a RADOS command results in an exception.
For example on a cluster node where no monitor is configured and no
'pveceph init' was performed, this leads to unexpected conditions. On such a
node, if you check the monitor tab in GUI the monitors are correctly displayed,
but they seem to have no quorum, because actually the RADOS command didn't return.

Signed-off-by: Tim Marx <t.marx@proxmox.com>
5 years agoMake error messages in Rados.pm prettier
Alwin Antreich [Mon, 18 Jun 2018 16:12:41 +0000 (18:12 +0200)]
Make error messages in Rados.pm prettier

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
6 years agobump version to 1.0-5
Dietmar Maurer [Fri, 6 Apr 2018 09:29:15 +0000 (11:29 +0200)]
bump version to 1.0-5

6 years agoallow to specify the userid with rados_create
Alwin Antreich [Thu, 5 Apr 2018 08:41:36 +0000 (10:41 +0200)]
allow to specify the userid with rados_create

This allows to connect to a cluster with a different user, besides admin

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
6 years agoSplit method pve_rados_connect
Alwin Antreich [Thu, 5 Apr 2018 08:41:35 +0000 (10:41 +0200)]
Split method pve_rados_connect

To be able to connect through librados2 without a config file, the
method pve_rados_connect is split up into pve_rados_connect and
pve_rados_conf_read_file.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
6 years agowhite space cleanup
Alwin Antreich [Thu, 5 Apr 2018 08:41:34 +0000 (10:41 +0200)]
white space cleanup

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
7 years agobump version to 1.0-4
Fabian Grünbichler [Fri, 10 Mar 2017 12:15:39 +0000 (13:15 +0100)]
bump version to 1.0-4

7 years agobuildsys: update make upload target for stretch
Fabian Grünbichler [Fri, 10 Mar 2017 12:15:29 +0000 (13:15 +0100)]
buildsys: update make upload target for stretch

7 years agobuildsys: generate perlapi dependency version
Wolfgang Bumiller [Tue, 7 Feb 2017 14:30:20 +0000 (15:30 +0100)]
buildsys: generate perlapi dependency version

7 years agobuildsys: use fakeroot for dpkg-deb
Wolfgang Bumiller [Tue, 7 Feb 2017 14:27:11 +0000 (15:27 +0100)]
buildsys: use fakeroot for dpkg-deb

7 years agobuildsys: use gzip -n to disable timestamps
Wolfgang Bumiller [Tue, 7 Feb 2017 14:27:04 +0000 (15:27 +0100)]
buildsys: use gzip -n to disable timestamps

7 years agobuildsys: get perl path from perl
Wolfgang Bumiller [Tue, 31 Jan 2017 10:15:19 +0000 (11:15 +0100)]
buildsys: get perl path from perl

9 years agobump version to 1.0-3
Dietmar Maurer [Mon, 9 Mar 2015 05:54:37 +0000 (06:54 +0100)]
bump version to 1.0-3

9 years agofix perl path
Dietmar Maurer [Mon, 9 Mar 2015 05:53:34 +0000 (06:53 +0100)]
fix perl path

9 years agoupdate package dependencies for Debian Jessie
Dietmar Maurer [Thu, 26 Feb 2015 12:28:57 +0000 (13:28 +0100)]
update package dependencies for Debian Jessie

10 years agobump version to 1.0-1
Dietmar Maurer [Mon, 27 Jan 2014 11:17:28 +0000 (12:17 +0100)]
bump version to 1.0-1

Depend on ceph dumpling (instead of emperor), and use our own version schema.

10 years agoadd method to get/set timeout
Dietmar Maurer [Wed, 22 Jan 2014 06:58:34 +0000 (07:58 +0100)]
add method to get/set timeout

10 years agoallow clean shutdown with displaying 'partial read' error.
Dietmar Maurer [Tue, 21 Jan 2014 11:27:33 +0000 (12:27 +0100)]
allow clean shutdown with displaying 'partial read' error.

10 years agodetect forked connections
Dietmar Maurer [Tue, 21 Jan 2014 11:04:05 +0000 (12:04 +0100)]
detect forked connections

Else more than one process can kill our worker!

10 years agocleanup
Dietmar Maurer [Tue, 21 Jan 2014 10:00:27 +0000 (11:00 +0100)]
cleanup

10 years agoinitialize PVE::RPCEnvironment in test.pl
Dietmar Maurer [Tue, 21 Jan 2014 09:33:57 +0000 (10:33 +0100)]
initialize PVE::RPCEnvironment in test.pl

10 years agoimplement timeout
Dietmar Maurer [Tue, 21 Jan 2014 09:30:22 +0000 (10:30 +0100)]
implement timeout

10 years agodepend on libpve-access-control
Dietmar Maurer [Tue, 21 Jan 2014 08:18:01 +0000 (09:18 +0100)]
depend on libpve-access-control

We need to be able to close open server sockets.

10 years agoalways for worker process
Dietmar Maurer [Mon, 20 Jan 2014 12:36:53 +0000 (13:36 +0100)]
always for worker process

librados does not work well when we fork after rados_connect().
So we always fork a separate worker and use IPC to send/receive data.

10 years agocleanup test code
Dietmar Maurer [Mon, 20 Jan 2014 07:43:40 +0000 (08:43 +0100)]
cleanup test code

10 years agoavoid memory leak, add debug helper DPRINTF
Dietmar Maurer [Mon, 20 Jan 2014 07:35:11 +0000 (08:35 +0100)]
avoid memory leak, add debug helper DPRINTF

10 years agofix compiler flags and warnings
Dietmar Maurer [Mon, 20 Jan 2014 06:48:59 +0000 (07:48 +0100)]
fix compiler flags and warnings

10 years agoimprove examples
Dietmar Maurer [Fri, 17 Jan 2014 08:20:31 +0000 (09:20 +0100)]
improve examples

10 years agoavoid unnecessary warning
Dietmar Maurer [Fri, 17 Jan 2014 08:16:00 +0000 (09:16 +0100)]
avoid unnecessary warning

10 years agofix .so install path
Dietmar Maurer [Thu, 16 Jan 2014 13:30:02 +0000 (14:30 +0100)]
fix .so install path

10 years agouse json format by default
Dietmar Maurer [Thu, 16 Jan 2014 12:23:47 +0000 (13:23 +0100)]
use json format by default

10 years agocode cleanups
Dietmar Maurer [Thu, 16 Jan 2014 11:59:18 +0000 (12:59 +0100)]
code cleanups

10 years agoadd simple test script
Dietmar Maurer [Thu, 16 Jan 2014 11:45:58 +0000 (12:45 +0100)]
add simple test script

10 years agoallow to set client_mount_timeout
Dietmar Maurer [Thu, 16 Jan 2014 11:45:12 +0000 (12:45 +0100)]
allow to set client_mount_timeout

10 years agoinitial import
Dietmar Maurer [Thu, 16 Jan 2014 09:27:35 +0000 (10:27 +0100)]
initial import