Commit Graph

539 Commits

Author SHA1 Message Date
Thomas Lamprecht
35f8fae2c8 use the pvecm mtunnel command to get remote migration ip
Ask the pvecm mtunnel command (was earlier in qm) if the remote side
has an IP configured in a given migration_network denoted by a CIDR.

If such a IP is available reset the nodeip and rem_ssh variables
and check if we can connect to the other side with ssh public key
authentication.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-11-03 09:43:42 +01:00
Wolfgang Bumiller
77b2b96ffc tempfile: use /tmp for fallback-tempfiles
At this point we know it's not a tmpfs (as tmpfs definitely
supports O_TMPFILE), so /tmp makes more sense than /run as
default path.
2016-11-02 12:47:05 +01:00
Wolfgang Bumiller
7e1ee743f4 tempfile: unliked-file fallback
some file systems (eg. ZFS) don't support O_TMPFILE
2016-11-02 12:44:35 +01:00
Wolfgang Bumiller
f0cfc20e65 Fix #1188: tempfile: use /run by default
as /tmp is not a tmpfs by default and some file systems
(like ZFS) don't support O_TMPFILE
2016-11-02 12:43:16 +01:00
Wolfgang Bumiller
7c1617b01d JSONSchema: named formats in parse_property_string
While our code currently passes the format hashes directly,
some code gets them via the format property of a
configuration description which verifies successfully via
check_format() for named property string formats, so this
should be allowed.
2016-11-02 12:40:56 +01:00
Dietmar Maurer
a9da67124d bump version to 4.0-79 2016-10-28 17:47:21 +02:00
Dietmar Maurer
ae97d5532d CpuSet: read $MAX_CPUID from /proc/cpuinfo 2016-10-28 17:43:41 +02:00
Thomas Lamprecht
beb9820ffb add get_local_ip_from_cidr
The get_local_ip_from_cidr method can be used to determine addresses
configured on interfaces from the callers node which are located
in the subnet. The subnet can be passed in CIDR notation.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2016-10-28 12:01:38 +02:00
Dominik Csapak
8b6e737a75 fix typo
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
2016-10-28 08:50:02 +02:00
Dietmar Maurer
08ffd3f3dd bump version to 4.0-78 2016-10-28 07:04:41 +02:00
Dietmar Maurer
284dca701b CpuSet: add helper to format/print cpu sets. 2016-10-28 06:56:55 +02:00
Dietmar Maurer
2862235726 bump version to 4.0-77 2016-10-26 11:16:28 +02:00
Dietmar Maurer
a1c3f18e06 CpuSet: Simply class to handle cpu sets 2016-10-26 11:13:33 +02:00
Michael Rasmussen
d3d77e03f8 Add check for infiniband to write functions as well
Signed-off-by: Michael Rasmussen <mir@datanom.net>
2016-10-24 11:37:35 +02:00
Michael Rasmussen
309085272b Add support for infiniband nics
Signed-off-by: Michael Rasmussen <mir@datanom.net>
2016-10-24 11:36:43 +02:00
Dietmar Maurer
8fd0e286c2 bump version to 4.0-76 2016-10-20 06:16:42 +02:00
Michael Rasmussen
48e957b935 Update to reflect current status
Signed-off-by: Michael Rasmussen <mir@datanom.net>
2016-10-20 06:14:26 +02:00
Wolfgang Bumiller
d152f8b0ee SectionConfig: always write out explicitly set booleans
Because when only writing the ones which are true we're
breaking the ones which default to true (like the mkdir
option on directory storages, where we need a false value
to be written out explicitly).
2016-10-18 10:50:04 +02:00
Dietmar Maurer
e7cc4f9a97 bump version to 4.0-75 2016-10-07 09:02:51 +02:00
Fabian Grünbichler
0a5a1eeec2 correct spelling of synopsis 2016-10-07 09:02:07 +02:00
Dietmar Maurer
ec48b70cc9 bump version to 4.0-74 2016-09-29 12:46:42 +02:00
Wolfgang Bumiller
f3ccd9b4b9 Network: add disable_ipv6 and use it
Many interfaces used to get an ipv6 link-local address which
was usually unusable and therefore pointless.

In order to ensure consistency this is called in various
places:
* $bridge_add_interface() and $ovs_bridge_add_port() because
  it's generally a good choice for bridge ports.
* tap_create() and veth_create() because the activate the
  interfaces and we want to avoid the link local address to
  exist temporarily between bringing the interface up and
  adding it to a bridge.
* create_firewall_bridge_*() because firewall bridges aren't
  meant to have addresses either.
* activate_bridge_vlan() - if vlan_filtering is disabled we
  create vlan-bridges and neither them nor their physical
  ports should have link local addresses.
2016-09-29 12:45:23 +02:00
Dietmar Maurer
b54ad320a5 fix doc generator (do not convert efidisk0 to efidisk[N])
Also fix spacing in typetext generator.
2016-09-29 12:15:47 +02:00
Dietmar Maurer
1eac8b4b2c bump version to 4.0-73 2016-09-16 08:48:41 +02:00
Dietmar Maurer
05185ea25a schema_get_type_text: always access values as number
Else PVE::RESTHandler::api_dump prints values as strings.
2016-09-05 09:27:50 +02:00
Dietmar Maurer
534d427098 add typetext property for more complex types 2016-09-05 07:47:32 +02:00
Fabian Grünbichler
0ddae1ce6d bump version to 4.0-72 2016-08-16 17:16:49 +02:00
Wolfgang Bumiller
ce338f4fbc harden file_set_contents against symlink attacks 2016-08-16 17:12:55 +02:00
Wolfgang Bumiller
88a490ff71 allow Regexp objects for strings in the schema
The 'pattern' property has type string and format regex, so
it makes sense to allow Regexp objects to be used for it.

While check_type() doesn't know the format, Regexp objects
can be treated like strings anyway, including compared via
'eq' or matched via '=~', so we allow strings to generally
come from a Regexp object.
2016-07-14 10:28:57 +02:00
Wolfgang Bumiller
123921731a tools: optional prefix for random_ether_addr 2016-07-14 09:01:01 +02:00
Wolfgang Bumiller
084dc74db6 bump version to 4.0-71 2016-07-11 11:34:10 +02:00
Wolfgang Bumiller
d743b69c4b fix mac address generation limitation
Commit de9a267 introduced vec() to optimize the generation
by using binary operations instead of converting back and
forth between hex and strings, but forgot to switch over to
the binary sha1 method. This resulted in only the first 6
hex digits of the output string making up the address.
2016-07-05 13:42:30 +02:00
Fabian Grünbichler
e561bc74bb fix 1046: add non-snapshotted disks as unused 2016-07-05 09:39:20 +02:00
Wolfgang Bumiller
28705ff6d1 df: untaint the result 2016-07-04 14:13:41 +02:00
Dietmar Maurer
fb1391aae7 use new repoman toolkit 2016-06-25 15:18:39 +02:00
Wolfgang Bumiller
a3f6f8a595 bump version to 4.0-70 2016-06-22 11:25:37 +02:00
Wolfgang Bumiller
a712bf6e37 Fix #132: hold a lock while setting up vlan bridges
It's possible for two simultaneous VM starts to try to
create vlan bridges on non-vlan-aware bridges
simultaneously, which causes one of them to fail with the
error "can't add bridge ...".
2016-06-21 15:01:30 +02:00
Dietmar Maurer
6a47f4b05d bump version to 4.0-69 2016-06-21 06:54:15 +02:00
Wolfgang Bumiller
78e912a3b7 vlan fixups: remove existing vlan ids
bridge_add_interface should remove the existing vids from
the interface (which is usually 1, which was previously left
on the interface)
2016-06-21 06:53:35 +02:00
Dietmar Maurer
e94ca8c8e6 bump version to 4.0-68 2016-06-09 17:56:47 +02:00
Fabian Grünbichler
c9c6d91073 catch malformed mailto/mailfrom in sendmail 2016-06-09 17:55:38 +02:00
Fabian Grünbichler
1a0c010327 remove duplicate 'set -o pipefail' 2016-06-07 10:37:25 +02:00
Dietmar Maurer
1912759d0e bump version to 4.0-67 2016-06-03 11:27:28 +02:00
Wolfgang Bumiller
0b9cf991e5 added: enter_systemd_scope
This essentially performas the task of systemd-run while
also waiting for the job to finish.

With the systemd-run version in jessie we run into a race
condition where the executed process can start forking child
processes before the systemd daemon is done setting up the
scope's cgroups, causing the children to NOT be included in
the cgroups. This means the child processes (in our case
qemu) will not adhere to the limits we want to apply to it
via cgroups.

enter_systemd_scope() performs the setup task of systemd-run
and waits for the job to finish, after this we can spawn the
qemu process without systemd-run.
2016-06-03 11:26:13 +02:00
Wolfgang Bumiller
f0d1b04fda move Network::get_active_interfaces to ProcFSTools
This avoids a circular dependency between PVE::INotify and
PVE::Network.

Also renamed to get_active_network_interfaces since the
package name now doesn't hint at this anymore.
2016-06-03 11:22:40 +02:00
Wolfgang Bumiller
19e609fd33 add netmasks starting from /8 to local netmask list 2016-06-03 11:21:57 +02:00
Wolfgang Bumiller
e43faad9ff Consider /31 and /32 valid subnet masks.
Since we already allow this for container IP addresses it is
reasonable to assume the host might be using such a setup as
well. (You can use an additional route to reach the gateway
and then simply have no "LAN".) Some people seem to want
this...
2016-06-03 11:21:42 +02:00
Dietmar Maurer
c1a4a02b98 bump version to 4.0-66 2016-06-01 11:32:28 +02:00
Wolfgang Bumiller
c064776576 Allow O_PATH and O_TMPFILE to be exported 2016-06-01 11:29:59 +02:00
Wolfgang Bumiller
21c56a963f added: openat, mkdirat 2016-06-01 11:29:49 +02:00