]> git.proxmox.com Git - pve-common.git/log
pve-common.git
6 years agoPVE::Subscription - new class to simplify subscription management
Dietmar Maurer [Fri, 29 Sep 2017 07:17:01 +0000 (09:17 +0200)]
PVE::Subscription - new class to simplify subscription management

6 years agoProcFSTools:read_proc_mounts: increase read size
Alexandre Derumier [Fri, 16 Dec 2016 16:26:10 +0000 (17:26 +0100)]
ProcFSTools:read_proc_mounts: increase read size

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
6 years agotools: df: handle a failing df
Wolfgang Bumiller [Mon, 11 Sep 2017 07:20:08 +0000 (09:20 +0200)]
tools: df: handle a failing df

This function assumed df() will work or hang, but it can
also actually fail and return undef which results in
warnings - let's silence those.

6 years agobump version to 5.0-18
Wolfgang Bumiller [Tue, 12 Sep 2017 11:43:55 +0000 (13:43 +0200)]
bump version to 5.0-18

6 years agorun_fork_with_timeout: allow returning complex structures
Thomas Lamprecht [Tue, 12 Sep 2017 11:25:30 +0000 (13:25 +0200)]
run_fork_with_timeout: allow returning complex structures

Encode the result or the error in JSON. This way complex objects or
exceptions may be passed to the parent in a generic way.

This allows to remove the second pipe 'pipe_err'.

Allow also to return undef without any warnings to our caller.
This avoids a "use of uninitialized variable ..." warning

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoUse double hyphens when prefixing command options in the documentation
Emmanuel Kasper [Wed, 6 Sep 2017 12:37:33 +0000 (14:37 +0200)]
Use double hyphens when prefixing command options in the documentation

This makes our man pages follow the GNU long option recommandations
where non-single character options are prefixed with a double hyphen
(https://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html)

The benefit for PVE is that our documentation looks more similar to what
a user with previous Linux knowledge is used to.

Our bash autocompletion helper only completes options using double hyphens too.

6 years agoTools: add `convert_size` for generic byte conversion
Thomas Lamprecht [Mon, 11 Sep 2017 08:41:34 +0000 (10:41 +0200)]
Tools: add `convert_size` for generic byte conversion

We often need to convert between file sizes, for formatting output,
but also code-internal. Some methods expect kilobytes, some gigabytes
and sometimes we need bytes.

While conversion from smaller to bigger units can be simply done with
a left-shift, the opposite conversion may need more attention -
depending on the used context.

If we allocate disks this is quite critical. For example, if we need
to allocate a disk with size 1023 bytes using the
PVE::Storage::vdisk_alloc method (which expects kilobytes) a
right shift by 10 (<=> division by 1024) would result in "0", which
obviously fails.

Thus we round up the converted value if a remainder was lost on the
transformation in this new method. This behaviour is opt-out, to be
on the safe side.

The method can be used in a clear way, as it gives information about
the source and target unit size, unlike "$var *= 1024", which doesn't
gives direct information at all, if not commented or derived
somewhere from its context.

For example:
 > my $size = convert_unit($value, 'gb' => 'kb');
is more clear than:
 > my $size = $value*1024*1024;

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agorun_fork_with_timeout: do not overwrite global signal handlers
Thomas Lamprecht [Wed, 6 Sep 2017 11:29:03 +0000 (13:29 +0200)]
run_fork_with_timeout: do not overwrite global signal handlers

perls 'local' must be either used in front of each $SIG{...}
assignments or they must be put in a list, else it affects only the
first variable and the rest are *not* in local context.

This may cause weird behaviour where daemons seemingly do not get
terminating signals delivered correctly and thus may not shutdown
gracefully anymore.

As we only send SIGINT to processes if a manual stop action gets
triggered just catch this one here.

As this is a general method which allows to pass an arbitrary code
payload we cannot sanely handle all signals here, so remove trapping
all other besides SIGINT, if those need to be trapped that should be
done by the caller on a case by case basis.

Fixes: #1495
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-17
Fabian Grünbichler [Wed, 6 Sep 2017 07:37:01 +0000 (09:37 +0200)]
bump version to 5.0-17

6 years agobuild: drop -rfakeroot
Fabian Grünbichler [Wed, 6 Sep 2017 07:36:49 +0000 (09:36 +0200)]
build: drop -rfakeroot

6 years agobuild: use 'git rev-parse' for GITVERSION
Fabian Grünbichler [Wed, 6 Sep 2017 07:36:41 +0000 (09:36 +0200)]
build: use 'git rev-parse' for GITVERSION

6 years agorename variable
Fabian Grünbichler [Mon, 15 May 2017 07:31:08 +0000 (09:31 +0200)]
rename variable

to prevent confusion of rendered type text vs. original type
property

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoapi: fix rendering of filepath/string parameters
Fabian Grünbichler [Mon, 15 May 2017 07:31:07 +0000 (09:31 +0200)]
api: fix rendering of filepath/string parameters

25d9bda94127b1a91181cd80bb9948093dea389b broke this check,
but it is a better idea to check against the actual type
rather then the rendered type text anyway.

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agotools: add pipe_socket_to_command
Thomas Lamprecht [Thu, 17 Aug 2017 13:05:45 +0000 (15:05 +0200)]
tools: add pipe_socket_to_command

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoJSONSchema: add parse_boolean helper
Wolfgang Bumiller [Fri, 28 Jul 2017 07:52:44 +0000 (09:52 +0200)]
JSONSchema: add parse_boolean helper

6 years agorestenv: catch broadcast_tasklist errors gracefully
Thomas Lamprecht [Tue, 25 Jul 2017 13:32:23 +0000 (15:32 +0200)]
restenv: catch broadcast_tasklist errors gracefully

Don't die because the tasklist could not be broadcasted, just log the
error.
Else we may hinder all task to run with a quite confusing error (i.e.
"ipcc_send_rec: file to big").

This may happen if there are a lot currently running tasks at once.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agorestenv: remove unused variable 'ctime'
Thomas Lamprecht [Tue, 25 Jul 2017 13:32:21 +0000 (15:32 +0200)]
restenv: remove unused variable 'ctime'

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agorestenv: remove unnecessary if
Thomas Lamprecht [Tue, 25 Jul 2017 13:32:20 +0000 (15:32 +0200)]
restenv: remove unnecessary if

we return early from this function if the $rest_env singleton doesn't
evaluates to true yet, so this check is useless here.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-16
Wolfgang Bumiller [Fri, 30 Jun 2017 07:18:17 +0000 (09:18 +0200)]
bump version to 5.0-16

6 years agoAdd run_fork_with_timeout utility
Emmanuel Kasper [Thu, 29 Jun 2017 12:48:12 +0000 (14:48 +0200)]
Add run_fork_with_timeout utility

This runs subroutine in a forked process
and kills it after a timeout

6 years agobump version to 5.0-15
Dietmar Maurer [Tue, 27 Jun 2017 09:26:56 +0000 (11:26 +0200)]
bump version to 5.0-15

6 years agouse more reliable checks in wait_for_vnc_port
Thomas Lamprecht [Tue, 27 Jun 2017 09:12:04 +0000 (11:12 +0200)]
use more reliable checks in wait_for_vnc_port

We run into problems where this method returned to early, even if the
port wasn't actually ready yet. The reason for this is that we
checked /proc/net/tcp which does not guarantees and always up to date
state of only those ports which are actuall available, i.e. a port
could linger around (time-wait state) or appear even if it wasn't
accepting connections yet (as stated in the kernel docs:
/proc/net/tcp is seen as obsolete by the kernel devs).

Use the `ss` tool from the iproute2 package, it uses netlink to get
the current state and has switches where we can direct it to really
only get the state of those sockets which interest us currently.
I.e., we tell it to get only listening TCP sockets from the requested
port.

The only drawback is that we loop on a run_command, which is slower
than just reading a file. A single loop needs about 1ms here vs the
60µs on the /proc/net/tcp read. But this isn't a api call which is
used highly frequently but rather once per noVNC console open.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-14
Dietmar Maurer [Thu, 22 Jun 2017 06:26:17 +0000 (08:26 +0200)]
bump version to 5.0-14

6 years agoadd the parsing error message to the format
Dominik Csapak [Tue, 13 Jun 2017 09:25:35 +0000 (11:25 +0200)]
add the parsing error message to the format

so that one can see its error when using the api/gui

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agoadd ability to have multiple timespecs for hours and minutes
Dominik Csapak [Tue, 13 Jun 2017 09:25:34 +0000 (11:25 +0200)]
add ability to have multiple timespecs for hours and minutes

so things like: 2,4:0 will work

also add regression tests for this

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agotrim event and check if empty
Dominik Csapak [Tue, 13 Jun 2017 09:25:33 +0000 (11:25 +0200)]
trim event and check if empty

give a meaningful error if it is empty and disallow it instead of having
an implicit default (the default should be set by the component using
the calendarevent, not the calendarevent itself)

also add regression tests

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agoadd and use physical NIC regexp
Fabian Grünbichler [Mon, 22 May 2017 07:44:17 +0000 (09:44 +0200)]
add and use physical NIC regexp

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
6 years agoget_ip_from_hostname: improve error message
Dietmar Maurer [Wed, 31 May 2017 12:59:44 +0000 (14:59 +0200)]
get_ip_from_hostname: improve error message

And do not generate multi-line error message.

6 years agocalendarevent: check range for start also without repetition
Dominik Csapak [Thu, 1 Jun 2017 12:17:10 +0000 (14:17 +0200)]
calendarevent: check range for start also without repetition

else an event like "61" never finishes when calculating the next event

also add regression tests for this and other range checks

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agobump version to 5.0-13
Dietmar Maurer [Wed, 31 May 2017 07:08:07 +0000 (09:08 +0200)]
bump version to 5.0-13

6 years agocalendarevent: change sorting of hours and minutes to numeric
Dominik Csapak [Tue, 30 May 2017 13:30:22 +0000 (15:30 +0200)]
calendarevent: change sorting of hours and minutes to numeric

otherwise the numbers are sorted like this:
[1,10,11 .. 19, 2, 20, ..]
which would lead to the wrong next time

also add regression tests for this and mixed forms like:
20..22:*/30

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
6 years agotools: next_unused_port: use IPPROTO_TCP explicitly
Wolfgang Bumiller [Tue, 30 May 2017 13:30:10 +0000 (15:30 +0200)]
tools: next_unused_port: use IPPROTO_TCP explicitly

Otherwise perl tries to bind+listen on a UDP socket if the
TCP socket fails - which is a waste since we're looking for
TCP ports.
Additionall since UDP doesn't support listen(), perl will
return EOPNOTSUPP instead of, say, EADDRINUSE. (We don't
care about the error in this code though.)

6 years agotools: unused ports: optional address parameter
Wolfgang Bumiller [Tue, 30 May 2017 13:30:09 +0000 (15:30 +0200)]
tools: unused ports: optional address parameter

While it should be impossible to bind to a wildcard address
when the port is in use by any other address there's one
case where this is allowed, and that's when the port is in
use by an ipv6 address while trying to bind to an ipv4
wildcard.
This currently happens when qemu finds ::1 for the
'localhost' we pass to qemu's spice address while we're
resolving the local nodename via IPv4.

6 years agoPVE::JSONSchema - add proxyto_callback property
Dietmar Maurer [Mon, 29 May 2017 09:37:09 +0000 (11:37 +0200)]
PVE::JSONSchema - add proxyto_callback property

6 years agoRevert "JSONSchema.pm: register new standard option pve-replicate"
Dietmar Maurer [Tue, 23 May 2017 11:03:57 +0000 (13:03 +0200)]
Revert "JSONSchema.pm: register new standard option pve-replicate"

This reverts commit b6501c2fd913d9359a48007594d94a8c8a8745b5.

No longer required, because we use a separate SectionConfig file to
store replication config.

6 years agoMerge branch 'master' of pve-git:pve/pve-common
Fabian Grünbichler [Mon, 29 May 2017 11:57:03 +0000 (13:57 +0200)]
Merge branch 'master' of pve-git:pve/pve-common

6 years agoswap raw syscall numbers with syscall.ph for easier porting
Thomas Lamprecht [Wed, 10 May 2017 13:03:45 +0000 (15:03 +0200)]
swap raw syscall numbers with syscall.ph for easier porting

Raw syscall numbers were not platform independent, so replace them
with the helpers provided from the syscall.ph perl bits helper.

This makes reading the code easier as a nice side effect.

As syscall.ph is not an ordinary module and makes problems when it is
required by multiple modules we make a own module PVE::Syscall which
loads it and allows to export the necessary constants in a sane way.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-12
Fabian Grünbichler [Thu, 18 May 2017 13:44:42 +0000 (15:44 +0200)]
bump version to 5.0-12

6 years agofix #1388: cpuset: sort members numerically
Wolfgang Bumiller [Thu, 18 May 2017 06:54:15 +0000 (08:54 +0200)]
fix #1388: cpuset: sort members numerically

6 years agoPVE::CalendarEvent - register format 'pve-calendar-event'
Dietmar Maurer [Wed, 17 May 2017 08:49:30 +0000 (10:49 +0200)]
PVE::CalendarEvent - register format 'pve-calendar-event'

6 years agotest/calendar_event_test.pl: regression tests for PVE::CalendarEvent
Dietmar Maurer [Wed, 17 May 2017 05:18:24 +0000 (07:18 +0200)]
test/calendar_event_test.pl: regression tests for PVE::CalendarEvent

6 years agoCalendarEvent.pm: implement parser/utils for systemd like calender exents
Dietmar Maurer [Wed, 17 May 2017 05:07:25 +0000 (07:07 +0200)]
CalendarEvent.pm: implement parser/utils for systemd like calender exents

Not complete, but useful.

6 years agoTools: make file-locking aware of external exception sources
Wolfgang Bumiller [Thu, 11 May 2017 10:40:02 +0000 (12:40 +0200)]
Tools: make file-locking aware of external exception sources

Previously an external exception (eg. caused by a SIGARLM in a code
which is already inside a run_with_timeout() call) could happen in
various places where we did not properly this situation.
For instance after calling $lock_func() but before reaching the cleanup
code. In this case a lock was leaked.
Additionally the code was broken in that it used perl's automatic hash
creation side effect ($a->{x}->{y} implicitly initializing $a->{x} with
an empty hash when it did not exist). The effect was that if our own
time out was triggered after the initial check for an existing file
handle inside $lock_func() happened (extremely rare since perl would have
to be running insanely slow), the cleanup did:

    if (my $fh = $lock_handles->{$$}->{$filename}->{fh}) {

This recreated $lock_handles->{$$}->{$filename} as an empty hash.
A subsequent call to lock_file_full() will think a file descriptor
already exists because the check simply used:

    if (!$lock_handles->{$$}->{$filename}) {

While this could have been a one-line fix for this one particular case,
we'd still not be taking external timeouts into account causing the
first issue described above.

6 years agoSectionConfig.pm: pass section data to format_section_header
Dietmar Maurer [Wed, 10 May 2017 09:14:53 +0000 (11:14 +0200)]
SectionConfig.pm: pass section data to format_section_header

So that we can store data in section headers

6 years agoJSONSchema.pm: register new standard option pve-replicate
Dietmar Maurer [Sat, 6 May 2017 07:00:50 +0000 (09:00 +0200)]
JSONSchema.pm: register new standard option pve-replicate

6 years agobump version to 5.0-11
Fabian Grünbichler [Fri, 5 May 2017 10:39:24 +0000 (12:39 +0200)]
bump version to 5.0-11

6 years agoget_options: handle array and scalar refs on decoding
Thomas Lamprecht [Fri, 5 May 2017 09:10:43 +0000 (11:10 +0200)]
get_options: handle array and scalar refs on decoding

get_options is for parsing CLI options, here we decode after using
Getopt as we are not sure how well it handles already decoded data.
But as Gettopt can produces references for the parsed data we must
handle them explictily.
So check if we have a ARRAY or SCALAR reference and decode them
respectively.
All other reference types should not get returned from Getopt so
error out on them.

This bug was seen when viewing backup jobs, as we save the job as a
comand entry in /etc/pve/vzdump.cron and parse it then with this
function on reading.
Besides the use there we use it in the RESTHandler Packages
cli_handler sub method, so some CLI tools could be possibly affected
by this.

Fixes: 24197a9f6c698985b7255fbf7792b0b6bd8188b5
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agoNetwork: add helpers to resolve hostnames to IPs
Thomas Lamprecht [Tue, 2 May 2017 09:51:19 +0000 (11:51 +0200)]
Network: add helpers to resolve hostnames to IPs

Add addr_to_ip and get_ip_from_hostname helpers to PVE::Network

The first helper, addr_to_ip, is based on Wolfgangs version of this
[0]
I just moved it from PVE::Tools to PVE::Network, as it seems a more
fitting place.
It uses getnameinfo to extract information from the paddr parameter,
which is sockaddr struct
It gets used in the second helper and in a bug fix series from
Wolfgang [1]

The second helper, get_ip_from_hostname, resolves an hostname to an
IP and checks if it isn't one from the for loopback reserved 127/8
subnet. It will be used in get_remote_nodeip from PVE::CLuster and
for a bugfix in pvecm.

[0]: http://pve.proxmox.com/pipermail/pve-devel/2017-April/026099.html
[1]: http://pve.proxmox.com/pipermail/pve-devel/2017-April/026098.html

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
6 years agobump version to 5.0-10
Dietmar Maurer [Tue, 2 May 2017 09:52:41 +0000 (11:52 +0200)]
bump version to 5.0-10

6 years agomark decode_utf8_parameters() as depreciated
Dietmar Maurer [Tue, 2 May 2017 09:30:50 +0000 (11:30 +0200)]
mark decode_utf8_parameters() as depreciated

6 years agouse Encode::Locale to encode parameters read from console(getopt)
Dietmar Maurer [Tue, 2 May 2017 09:09:35 +0000 (11:09 +0200)]
use Encode::Locale to encode parameters read from console(getopt)

6 years agobump version to 5.0-9
Dietmar Maurer [Sat, 29 Apr 2017 06:28:30 +0000 (08:28 +0200)]
bump version to 5.0-9

6 years agoPVE::RESTEnvironment::get_user - add $noerr parameter
Dietmar Maurer [Sat, 29 Apr 2017 06:27:09 +0000 (08:27 +0200)]
PVE::RESTEnvironment::get_user - add $noerr parameter

7 years agobump version to 5.0-8
Wolfgang Bumiller [Thu, 20 Apr 2017 10:29:48 +0000 (12:29 +0200)]
bump version to 5.0-8

7 years agocpuset: remove max-cpu range check
Wolfgang Bumiller [Thu, 20 Apr 2017 08:35:52 +0000 (10:35 +0200)]
cpuset: remove max-cpu range check

CpuSets usually come from (or a built using) values read
from cgroups anyway. (Eg. for container balancing we only
use ids found in lxc/cpuset.effective_cpus.)

7 years agobump version to 5.0-7
Fabian Grünbichler [Mon, 10 Apr 2017 14:08:35 +0000 (16:08 +0200)]
bump version to 5.0-7

7 years agorun_command: default exit code to -1
Thomas Lamprecht [Wed, 5 Apr 2017 09:35:53 +0000 (11:35 +0200)]
run_command: default exit code to -1

When the child process running the command got  an signal or failed
to execute exitcode was still undefined as we extract it just only
after the signal/failed to execute check.
This led to:
 > Use of uninitialized value in numeric ne (!=) at
 > /usr/share/perl5/PVE/API2/Qemu.pm line 1433.
errors if we used run_commands `noerr` param and checked for the
commands exit code.

So just default the exit code to -1 for such cases.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 years agonet: only disable ipv6 on actual creation
Wolfgang Bumiller [Mon, 6 Mar 2017 14:35:39 +0000 (15:35 +0100)]
net: only disable ipv6 on actual creation

And leave it alone if the interface already existed.

7 years agoMakefile(clean): remove *.buildinfo
Dietmar Maurer [Tue, 4 Apr 2017 07:32:59 +0000 (09:32 +0200)]
Makefile(clean): remove *.buildinfo

7 years agoPVE::Tools::dump_journal: allow to filter a specific service
Dietmar Maurer [Tue, 4 Apr 2017 04:02:34 +0000 (06:02 +0200)]
PVE::Tools::dump_journal: allow to filter a specific service

7 years agobump version to 5.0-6
Dietmar Maurer [Mon, 3 Apr 2017 09:07:56 +0000 (11:07 +0200)]
bump version to 5.0-6

7 years agoAdd utility subroutine to get the fully qualified domain name of a host
Emmanuel Kasper [Wed, 22 Mar 2017 11:41:26 +0000 (12:41 +0100)]
Add utility subroutine to get the fully qualified domain name of a host

7 years agobump version to 5.0-4
Dietmar Maurer [Thu, 30 Mar 2017 15:51:06 +0000 (17:51 +0200)]
bump version to 5.0-4

7 years agoPVE::Tools::encrypt_pw() - new helper copied from pve-access-control
Dietmar Maurer [Thu, 30 Mar 2017 15:49:26 +0000 (17:49 +0200)]
PVE::Tools::encrypt_pw() - new helper copied from pve-access-control

7 years agobump version to 5.0-4
Dietmar Maurer [Thu, 30 Mar 2017 15:40:33 +0000 (17:40 +0200)]
bump version to 5.0-4

7 years agodepend on libmime-base32-perl (required by OTP.pm)
Dietmar Maurer [Thu, 30 Mar 2017 15:41:34 +0000 (17:41 +0200)]
depend on libmime-base32-perl (required by OTP.pm)

7 years agoOTP.pm: new class with OTP helpers
Dietmar Maurer [Thu, 30 Mar 2017 15:38:22 +0000 (17:38 +0200)]
OTP.pm: new class with OTP helpers

Copied from pve-access-control.

7 years agoREADME.dev: remove vlan and ifenslave-2.6 packages
Fabian Grünbichler [Wed, 29 Mar 2017 12:21:59 +0000 (14:21 +0200)]
README.dev: remove vlan and ifenslave-2.6 packages

we have a conflict on the former and the latter does not
even exist in Jessie.

7 years agoREADME.dev: remove '-y' from apt-get
Fabian Grünbichler [Wed, 29 Mar 2017 12:01:19 +0000 (14:01 +0200)]
README.dev: remove '-y' from apt-get

7 years agobump version to 5.0-3
Dietmar Maurer [Tue, 21 Mar 2017 11:07:34 +0000 (12:07 +0100)]
bump version to 5.0-3

7 years agoINotify.pm: use Clone::clone instead of Storable::dclone
Dietmar Maurer [Tue, 21 Mar 2017 10:56:49 +0000 (11:56 +0100)]
INotify.pm: use Clone::clone instead of Storable::dclone

I run into seroius troubles with dclone, which seem to be
buggy with tainted flag ...

Also, documentation states Clone::clone is much faster.

7 years agobump version to 5.0-2
Wolfgang Bumiller [Mon, 13 Mar 2017 14:07:18 +0000 (15:07 +0100)]
bump version to 5.0-2

7 years agoREADME.dev: add libiscsi-dev libiscsi7
Dietmar Maurer [Mon, 13 Mar 2017 11:58:51 +0000 (12:58 +0100)]
README.dev: add libiscsi-dev libiscsi7

7 years agoREADME.dev: change build order (pve-firewall before qemu-server)
Dietmar Maurer [Mon, 13 Mar 2017 11:54:05 +0000 (12:54 +0100)]
README.dev: change build order (pve-firewall before qemu-server)

7 years agoREADME.dev: remove lvm.git
Dietmar Maurer [Mon, 13 Mar 2017 11:41:52 +0000 (12:41 +0100)]
README.dev: remove lvm.git

7 years agoREADME.dev: add extjs.git and pve-guest-common.git
Dietmar Maurer [Mon, 13 Mar 2017 11:39:15 +0000 (12:39 +0100)]
README.dev: add extjs.git and pve-guest-common.git

7 years agoREADME.dev: add missing build depends for pve-cluster
root [Mon, 13 Mar 2017 11:26:21 +0000 (12:26 +0100)]
README.dev: add missing build depends for pve-cluster

7 years agoadd missing build dependencies
root [Mon, 13 Mar 2017 11:22:48 +0000 (12:22 +0100)]
add missing build dependencies

7 years agoREADME.dev: adopt package list for stretch
root [Mon, 13 Mar 2017 10:22:54 +0000 (11:22 +0100)]
README.dev: adopt package list for stretch

7 years agoadd keeplocale parameter to run_command
Dominik Csapak [Tue, 28 Feb 2017 11:06:35 +0000 (12:06 +0100)]
add keeplocale parameter to run_command

since the "lang" param has not worked, introduce a "keeplocale"
parameter instead.

the default behaviour is the same (set LC_ALL to 'C'), but we can use
the parameter to keep the locale from the host (eg. for the vncshell)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoMakefile: upload to --product pve,pmg
Dietmar Maurer [Wed, 8 Mar 2017 11:14:43 +0000 (12:14 +0100)]
Makefile: upload to --product pve,pmg

We use the same library for new proxmox mail gateway (pmg).

7 years agobump version to 5.0-1
Fabian Grünbichler [Wed, 8 Mar 2017 09:27:29 +0000 (10:27 +0100)]
bump version to 5.0-1

7 years agoMakefile: use "--product pve --dist jessie" for upload
Dietmar Maurer [Wed, 8 Mar 2017 08:56:23 +0000 (09:56 +0100)]
Makefile: use "--product pve --dist jessie" for upload

7 years agobump version to 4.0-93
Dietmar Maurer [Wed, 8 Mar 2017 05:18:32 +0000 (06:18 +0100)]
bump version to 4.0-93

7 years agoSectionConfig::check_value: return bool/numbers as numeric value
Dietmar Maurer [Sat, 25 Feb 2017 08:37:18 +0000 (09:37 +0100)]
SectionConfig::check_value: return bool/numbers as numeric value

This is important when we convert the result to JSON.
Else the GUI receives booleans as "0", which evaluate to true
in JS!

NOTE: "0" evaluates to false with perl.

7 years agoJSONSchema::check_type: return success (not value)
Dietmar Maurer [Sat, 25 Feb 2017 08:24:24 +0000 (09:24 +0100)]
JSONSchema::check_type: return success (not value)

7 years agoRESTEnvironment->init_request: reset result_attributes
Dietmar Maurer [Fri, 24 Feb 2017 05:30:16 +0000 (06:30 +0100)]
RESTEnvironment->init_request: reset result_attributes

7 years agoSectionConfig: add new parameter $skip_type to createSchema()
Dietmar Maurer [Mon, 20 Feb 2017 11:40:33 +0000 (12:40 +0100)]
SectionConfig: add new parameter $skip_type to createSchema()

This is useful when there is only a single type of entries.

7 years agoSectionConfig:write_config: sort options by key name
Dietmar Maurer [Sun, 19 Feb 2017 13:45:08 +0000 (14:45 +0100)]
SectionConfig:write_config: sort options by key name

Else we can get different config digest...

7 years agoSectionConfig: allow to get class specific updateSchema()
Dietmar Maurer [Sun, 19 Feb 2017 10:17:34 +0000 (11:17 +0100)]
SectionConfig: allow to get class specific updateSchema()

Useful when you have different section types, and you want to have
separate update API methods.

7 years ago(maybe) fixes #1229: fix port reservation
Dominik Csapak [Thu, 16 Feb 2017 08:24:18 +0000 (09:24 +0100)]
(maybe) fixes #1229: fix port reservation

when reserving ports, we use lock_file to lock the
reservation file, but then use file_set_content which
writes a new file and renames it, making the lock invalid
and different processes waiting for the lock get inconsistent
data

instead we use a designated lock file for the lock, so that we don't
lose the lock when writing the reservation file

this should fix the problem that sometimes multiple vms get the
same vnc/spice port

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agofix trailing whitespaces
Dominik Csapak [Wed, 15 Feb 2017 16:09:37 +0000 (17:09 +0100)]
fix trailing whitespaces

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
7 years agoFix example to latest RestHandler
Emmanuel Kasper [Tue, 14 Feb 2017 13:36:31 +0000 (14:36 +0100)]
Fix example to latest RestHandler

looking at the handle() sub from RestHandler.pm

    my $result = &$func($param);

this parameters are not passed anymore

7 years agobump version to 4.0-92
Wolfgang Bumiller [Thu, 9 Feb 2017 10:40:07 +0000 (11:40 +0100)]
bump version to 4.0-92

7 years agodeps: moving skiplock breaks qemu-server << 4.0-109
Wolfgang Bumiller [Tue, 7 Feb 2017 13:58:08 +0000 (14:58 +0100)]
deps: moving skiplock breaks qemu-server << 4.0-109

7 years agoJSONSchema: adding skiplock option here
Wolfgang Bumiller [Tue, 7 Feb 2017 13:50:44 +0000 (14:50 +0100)]
JSONSchema: adding skiplock option here

7 years agoNetwork: stop using ifconfig
Wolfgang Bumiller [Mon, 6 Feb 2017 10:21:01 +0000 (11:21 +0100)]
Network: stop using ifconfig

We shouldn't mix different tool sets on the one hand, and on
the other hand net-tools is an optional package in stretch
and there's no real need for us to depend on it.

7 years agobump version to 4.0-91
Fabian Grünbichler [Mon, 6 Feb 2017 13:45:47 +0000 (14:45 +0100)]
bump version to 4.0-91

7 years agoadd Breaks for upgrade path
Fabian Grünbichler [Mon, 6 Feb 2017 13:44:48 +0000 (14:44 +0100)]
add Breaks for upgrade path

7 years agobuildsys: missing build-dependencies
Wolfgang Bumiller [Fri, 3 Feb 2017 11:12:54 +0000 (12:12 +0100)]
buildsys: missing build-dependencies