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

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:: ...@@ -69,8 +69,8 @@ groups on all nodes::
$ gnt-cluster redist-conf $ gnt-cluster redist-conf
#. If you use file storage, check that the ``/etc/ganeti/file-storage-paths`` #. 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 is correct on all nodes. For security reasons it's not copied
#. automatically, but it can be copied manually via:: automatically, but it can be copied manually via::
$ gnt-cluster copyfile /etc/ganeti/file-storage-paths $ 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 ...@@ -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 */5 * * * * root [ -x @SBINDIR@/ganeti-watcher ] && @SBINDIR@/ganeti-watcher
# Clean job archive (at 01:45 AM) # 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) # Clean job archive (at 02:45 AM)
45 2 * * * @GNTNODEDUSER@ [ -x @SBINDIR@/ganeti-cleaner ] && @SBINDIR@/ganeti-cleaner node 45 2 * * * @GNTNODEDUSER@ [ -x @SBINDIR@/ganeti-cleaner ] && @SBINDIR@/ganeti-cleaner node
...@@ -2562,6 +2562,7 @@ class ConfigWriter: ...@@ -2562,6 +2562,7 @@ class ConfigWriter:
self._EnsureUUID(net, ec_id) self._EnsureUUID(net, ec_id)
net.serial_no = 1 net.serial_no = 1
net.ctime = net.mtime = time.time()
self._config_data.networks[net.uuid] = net self._config_data.networks[net.uuid] = net
self._config_data.cluster.serial_no += 1 self._config_data.cluster.serial_no += 1
......
...@@ -2739,6 +2739,9 @@ def _BuildNetworkFields(): ...@@ -2739,6 +2739,9 @@ def _BuildNetworkFields():
compat.partial(_GetNetworkStatsField, name, kind)) compat.partial(_GetNetworkStatsField, name, kind))
for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()]) for (name, (title, kind, _, doc)) in _NETWORK_STATS_FIELDS.items()])
# Add timestamps
fields.extend(_GetItemTimestampFields(IQ_NETWORKS))
return _PrepareFieldList(fields, []) return _PrepareFieldList(fields, [])
#: Fields for cluster information #: Fields for cluster information
......
...@@ -72,7 +72,7 @@ I_FIELDS = ["name", "admin_state", "os", ...@@ -72,7 +72,7 @@ I_FIELDS = ["name", "admin_state", "os",
"pnode", "snodes", "pnode", "snodes",
"disk_template", "disk_template",
"nic.ips", "nic.macs", "nic.modes", "nic.ips", "nic.macs", "nic.modes",
"nic.links", "nic.networks", "nic.bridges", "nic.links", "nic.networks", "nic.networks.names", "nic.bridges",
"network_port", "network_port",
"disk.sizes", "disk_usage", "disk.sizes", "disk_usage",
"beparams", "hvparams", "beparams", "hvparams",
...@@ -97,8 +97,8 @@ NET_FIELDS = ["name", "network", "gateway", ...@@ -97,8 +97,8 @@ NET_FIELDS = ["name", "network", "gateway",
"mac_prefix", "mac_prefix",
"free_count", "reserved_count", "free_count", "reserved_count",
"map", "group_list", "inst_list", "map", "group_list", "inst_list",
"external_reservations", "tags", "external_reservations",
] ] + _COMMON_FIELDS
G_FIELDS = [ G_FIELDS = [
"alloc_policy", "alloc_policy",
......
...@@ -259,6 +259,7 @@ $(buildObject "Network" "network" $ ...@@ -259,6 +259,7 @@ $(buildObject "Network" "network" $
simpleField "ext_reservations" [t| String |] simpleField "ext_reservations" [t| String |]
] ]
++ uuidFields ++ uuidFields
++ timeStampFields
++ serialFields ++ serialFields
++ tagsFields) ++ tagsFields)
...@@ -271,6 +272,10 @@ instance TagsObject Network where ...@@ -271,6 +272,10 @@ instance TagsObject Network where
instance UuidObject Network where instance UuidObject Network where
uuidOf = networkUuid uuidOf = networkUuid
instance TimeStampObject Network where
cTimeOf = networkCtime
mTimeOf = networkMtime
-- * NIC definitions -- * NIC definitions
$(buildParam "Nic" "nicp" $(buildParam "Nic" "nicp"
......
...@@ -248,8 +248,10 @@ genValidNetwork = do ...@@ -248,8 +248,10 @@ genValidNetwork = do
res <- liftM Just (genBitString $ netmask2NumHosts netmask) res <- liftM Just (genBitString $ netmask2NumHosts netmask)
ext_res <- liftM Just (genBitString $ netmask2NumHosts netmask) ext_res <- liftM Just (genBitString $ netmask2NumHosts netmask)
uuid <- arbitrary uuid <- arbitrary
ctime <- arbitrary
mtime <- arbitrary
let n = Network name mac_prefix (Ip4Network net netmask) net6 gateway 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 return n
-- | Generate an arbitrary string consisting of '0' and '1' of the given length. -- | 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