Commit 4eb06290 authored by Klaus Aehlig's avatar Klaus Aehlig

Merge branch 'stable-2.7' into stable-2.8

* stable-2.7
  Fix RAPI to include missing network fields
  Add support for querying network timestamps
  In the crontab example, look for the correct binary
  Fix wrong numbering in UPGRADE documentation

Conflicts:
	src/Ganeti/Objects.hs
	test/hs/Test/Ganeti/Objects.hs
Resolved by taking both additions.
Signed-off-by: default avatarKlaus Aehlig <aehlig@google.com>
Reviewed-by: default avatarHelga Velroyen <helgav@google.com>
parents 64d7e30f 95c83fe6
......@@ -69,8 +69,8 @@ groups on all nodes::
$ gnt-cluster redist-conf
#. If you use file storage, check that the ``/etc/ganeti/file-storage-paths``
#. is correct on all nodes. For security reasons it's not copied
#. automatically, but it can be copied manually via::
is correct on all nodes. For security reasons it's not copied
automatically, but it can be copied manually via::
$ gnt-cluster copyfile /etc/ganeti/file-storage-paths
......
......@@ -4,7 +4,7 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin:/usr/local/bin
*/5 * * * * root [ -x @SBINDIR@/ganeti-watcher ] && @SBINDIR@/ganeti-watcher
# Clean job archive (at 01:45 AM)
45 1 * * * @GNTMASTERUSER@ [ -x @SBINDIR@/ganeti-master-cleaner ] && @SBINDIR@/ganeti-cleaner master
45 1 * * * @GNTMASTERUSER@ [ -x @SBINDIR@/ganeti-cleaner ] && @SBINDIR@/ganeti-cleaner master
# Clean job archive (at 02:45 AM)
45 2 * * * @GNTNODEDUSER@ [ -x @SBINDIR@/ganeti-cleaner ] && @SBINDIR@/ganeti-cleaner node
......@@ -2562,6 +2562,7 @@ class ConfigWriter:
self._EnsureUUID(net, ec_id)
net.serial_no = 1
net.ctime = net.mtime = time.time()
self._config_data.networks[net.uuid] = net
self._config_data.cluster.serial_no += 1
......
......@@ -2739,6 +2739,9 @@ def _BuildNetworkFields():
compat.partial(_GetNetworkStatsField, name, kind))
for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()])
# Add timestamps
fields.extend(_GetItemTimestampFields(IQ_NETWORKS))
return _PrepareFieldList(fields, [])
#: Fields for cluster information
......
......@@ -72,7 +72,7 @@ I_FIELDS = ["name", "admin_state", "os",
"pnode", "snodes",
"disk_template",
"nic.ips", "nic.macs", "nic.modes",
"nic.links", "nic.networks", "nic.bridges",
"nic.links", "nic.networks", "nic.networks.names", "nic.bridges",
"network_port",
"disk.sizes", "disk_usage",
"beparams", "hvparams",
......@@ -97,8 +97,8 @@ NET_FIELDS = ["name", "network", "gateway",
"mac_prefix",
"free_count", "reserved_count",
"map", "group_list", "inst_list",
"external_reservations", "tags",
]
"external_reservations",
] + _COMMON_FIELDS
G_FIELDS = [
"alloc_policy",
......
......@@ -259,6 +259,7 @@ $(buildObject "Network" "network" $
simpleField "ext_reservations" [t| String |]
]
++ uuidFields
++ timeStampFields
++ serialFields
++ tagsFields)
......@@ -271,6 +272,10 @@ instance TagsObject Network where
instance UuidObject Network where
uuidOf = networkUuid
instance TimeStampObject Network where
cTimeOf = networkCtime
mTimeOf = networkMtime
-- * NIC definitions
$(buildParam "Nic" "nicp"
......
......@@ -248,8 +248,10 @@ genValidNetwork = do
res <- liftM Just (genBitString $ netmask2NumHosts netmask)
ext_res <- liftM Just (genBitString $ netmask2NumHosts netmask)
uuid <- arbitrary
ctime <- arbitrary
mtime <- arbitrary
let n = Network name mac_prefix (Ip4Network net netmask) net6 gateway
gateway6 res ext_res uuid 0 Set.empty
gateway6 res ext_res uuid ctime mtime 0 Set.empty
return n
-- | Generate an arbitrary string consisting of '0' and '1' of the given length.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment