diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-11-08 14:12:54 +0100 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2015-11-10 19:33:06 -0500 |
commit | 36b4a7ba555540edb7648e0f97019280b4ac38de (patch) | |
tree | a00ff6d8304552e68e08e026d7f0c174cbed5746 /src/basic | |
parent | e3c4a681db0b7004904b95d55fd1a443161c9397 (diff) |
Remove snapshot unit type
Snapshots were never useful or used for anything. Many systemd
developers that I spoke to at systemd.conf2015, didn't even know they
existed, so it is fairly safe to assume that this type can be deleted
without harm.
The fundamental problem with snapshots is that the state of the system
is dynamic, devices come and go, users log in and out, timers fire...
and restoring all units to some state from the past would "undo"
those changes, which isn't really possible.
Tested by creating a snapshot, running the new binary, and checking
that the transition did not cause errors, and the snapshot is gone,
and snapshots cannot be created anymore.
New systemctl says:
Unknown operation snapshot.
Old systemctl says:
Failed to create snapshot: Support for snapshots has been removed.
IgnoreOnSnaphost settings are warned about and ignored:
Support for option IgnoreOnSnapshot= has been removed and it is ignored
http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html
Diffstat (limited to 'src/basic')
-rw-r--r-- | src/basic/unit-name.c | 9 | ||||
-rw-r--r-- | src/basic/unit-name.h | 11 |
2 files changed, 0 insertions, 20 deletions
diff --git a/src/basic/unit-name.c b/src/basic/unit-name.c index 710421508c..5007ecf1a4 100644 --- a/src/basic/unit-name.c +++ b/src/basic/unit-name.c @@ -597,7 +597,6 @@ const char* unit_dbus_interface_from_type(UnitType t) { [UNIT_SOCKET] = "org.freedesktop.systemd1.Socket", [UNIT_BUSNAME] = "org.freedesktop.systemd1.BusName", [UNIT_TARGET] = "org.freedesktop.systemd1.Target", - [UNIT_SNAPSHOT] = "org.freedesktop.systemd1.Snapshot", [UNIT_DEVICE] = "org.freedesktop.systemd1.Device", [UNIT_MOUNT] = "org.freedesktop.systemd1.Mount", [UNIT_AUTOMOUNT] = "org.freedesktop.systemd1.Automount", @@ -819,7 +818,6 @@ static const char* const unit_type_table[_UNIT_TYPE_MAX] = { [UNIT_SOCKET] = "socket", [UNIT_BUSNAME] = "busname", [UNIT_TARGET] = "target", - [UNIT_SNAPSHOT] = "snapshot", [UNIT_DEVICE] = "device", [UNIT_MOUNT] = "mount", [UNIT_AUTOMOUNT] = "automount", @@ -950,13 +948,6 @@ static const char* const slice_state_table[_SLICE_STATE_MAX] = { DEFINE_STRING_TABLE_LOOKUP(slice_state, SliceState); -static const char* const snapshot_state_table[_SNAPSHOT_STATE_MAX] = { - [SNAPSHOT_DEAD] = "dead", - [SNAPSHOT_ACTIVE] = "active" -}; - -DEFINE_STRING_TABLE_LOOKUP(snapshot_state, SnapshotState); - static const char* const socket_state_table[_SOCKET_STATE_MAX] = { [SOCKET_DEAD] = "dead", [SOCKET_START_PRE] = "start-pre", diff --git a/src/basic/unit-name.h b/src/basic/unit-name.h index 65b55d9554..5f6d8299c5 100644 --- a/src/basic/unit-name.h +++ b/src/basic/unit-name.h @@ -32,7 +32,6 @@ typedef enum UnitType { UNIT_SOCKET, UNIT_BUSNAME, UNIT_TARGET, - UNIT_SNAPSHOT, UNIT_DEVICE, UNIT_MOUNT, UNIT_AUTOMOUNT, @@ -165,13 +164,6 @@ typedef enum SliceState { _SLICE_STATE_INVALID = -1 } SliceState; -typedef enum SnapshotState { - SNAPSHOT_DEAD, - SNAPSHOT_ACTIVE, - _SNAPSHOT_STATE_MAX, - _SNAPSHOT_STATE_INVALID = -1 -} SnapshotState; - typedef enum SocketState { SOCKET_DEAD, SOCKET_START_PRE, @@ -366,9 +358,6 @@ ServiceState service_state_from_string(const char *s) _pure_; const char* slice_state_to_string(SliceState i) _const_; SliceState slice_state_from_string(const char *s) _pure_; -const char* snapshot_state_to_string(SnapshotState i) _const_; -SnapshotState snapshot_state_from_string(const char *s) _pure_; - const char* socket_state_to_string(SocketState i) _const_; SocketState socket_state_from_string(const char *s) _pure_; |