summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrancisco Redondo Marchena <francisco.marchena@codethink.co.uk>2015-03-19 18:11:49 +0000
committerRichard Ipsum <richardipsum@fastmail.co.uk>2015-04-10 20:17:47 +0100
commit47e3e5acea326b486f2c9a6d7ab0571f9e60cf28 (patch)
tree8c65c0d5249239c8bc5902eb153c868cf9ab72c6
parentdfc6e823698d1b324a0017fa1e2a8ff64b7bf25a (diff)
downloaddefinitions-47e3e5acea326b486f2c9a6d7ab0571f9e60cf28.tar.gz
Update rstlib-fb and add target.service systemd unit service
This is required for the LIO kernel to restore the target configuration
-rw-r--r--strata/openstack-services.morph5
-rw-r--r--strata/openstack-services/rtslib-fb.morph27
2 files changed, 30 insertions, 2 deletions
diff --git a/strata/openstack-services.morph b/strata/openstack-services.morph
index ff63b135..553da724 100644
--- a/strata/openstack-services.morph
+++ b/strata/openstack-services.morph
@@ -355,8 +355,9 @@ chunks:
build-depends: []
- name: rtslib-fb
repo: upstream:python-packages/rtslib-fb
- ref: a020fbadfe530bc0773b73501c2cee420c435f87
- unpetrify-ref: v2.1.fb50
+ ref: 8ffb4739d596fb1aac5d62d173d1e6f80270af9d
+ unpetrify-ref: v2.1.fb52
+ morph: strata/openstack-services/rtslib-fb.morph
build-depends: []
- name: netifaces
repo: upstream:python-packages/netifaces
diff --git a/strata/openstack-services/rtslib-fb.morph b/strata/openstack-services/rtslib-fb.morph
new file mode 100644
index 00000000..26de3f9b
--- /dev/null
+++ b/strata/openstack-services/rtslib-fb.morph
@@ -0,0 +1,27 @@
+name: rtslib-fb
+kind: chunk
+build-system: python-distutils
+post-install-commands:
+- mkdir -p "$DESTDIR$PREFIX"/lib/systemd/system
+
+# The following systemd unit is from the fedora package see
+# http://pkgs.fedoraproject.org/cgit/python-rtslib.git/tree/target.service for
+# more information
+
+- |
+ install -D -m 0644 /proc/self/fd/0 <<'EOF' "$DESTDIR$PREFIX"/lib/systemd/system/target.service
+ [Unit]
+ Description=Restore LIO kernel target configuration
+ Requires=sys-kernel-config.mount
+ After=sys-kernel-config.mount network.target local-fs.target
+
+ [Service]
+ Type=oneshot
+ RemainAfterExit=yes
+ ExecStart=/usr/bin/targetctl restore
+ ExecStop=/usr/bin/targetctl clear
+ SyslogIdentifier=target
+
+ [Install]
+ WantedBy=multi-user.target
+ EOF