1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
|
From: Florin Dumitrascu <florin.dumitrascu@enea.com>
Date: Thu, 17 Mar 2016 18:15:42 +0100
Subject: [PATCH] ODL leveldb, leveldbjni: Enable arm64 support.
ODL depends on a native library (leveldb).
ODL Beryllium and Boron versions are still using a native x86 version
of this library (wrapped in leveldbjni).
There is no upstream version of leveldbjni supporting arm64 leveldb,
so we need to compile it when deploying ODL.
This is done when running odl-install puppet manifest.
For more info about this ODL limitation, see [1].
[ Alexandru.Avadanii@enea.com ]
Remove JAVA8 changes after upstream rework.
Convert puppet patching to prebuilt DEB package, as part of [2].
[1] https://bugs.opendaylight.org/show_bug.cgi?id=3973
[2] https://jira.opnfv.org/browse/ARMBAND-114
Signed-off-by: Florin Dumitrascu <florin.dumitrascu@enea.com>
Signed-off-by: Stanislaw Kardach <stanislaw.kardach@cavium.com>
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
.../puppet/modules/opendaylight/manifests/init.pp | 8 ++++++++
.../modules/opendaylight/manifests/install.pp | 12 +++++++++--
.../modules/opendaylight/manifests/leveldbjni.pp | 24 ++++++++++++++++++++++
3 files changed, 42 insertions(+), 2 deletions(-)
create mode 100644 deployment_scripts/puppet/modules/opendaylight/manifests/leveldbjni.pp
diff --git a/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp b/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp
index a322f70..f71bfc8 100644
--- a/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp
+++ b/deployment_scripts/puppet/modules/opendaylight/manifests/init.pp
@@ -10,4 +10,12 @@ class opendaylight {
$odl_mgmt_ips = values($odl_mgmt_ips_hash)
$odl_nodes_names = keys($odl_mgmt_ips_hash)
$node_internal_address = $odl_mgmt_ips_hash["node-${node_uid}"]
+
+ $arch = $::architecture ? {
+ 'aarch64' => $::osfamily ? {
+ 'Debian' => 'arm64',
+ default => 'aarch64',
+ },
+ default => $::architecture,
+ }
}
diff --git a/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp b/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp
index 924a840..d55a311 100644
--- a/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp
+++ b/deployment_scripts/puppet/modules/opendaylight/manifests/install.pp
@@ -17,6 +17,12 @@ class opendaylight::install (
ensure => installed,
}
+ if ($::osfamily == 'Debian' and $::opendaylight::arch == 'arm64') {
+ class { 'opendaylight::leveldbjni':
+ require => Package[$odl_package],
+ }
+ }
+
# quagga
class { 'opendaylight::quagga':
before => Service['opendaylight']
@@ -35,7 +41,8 @@ class opendaylight::install (
debug("Set odl rest api port to ${rest_port}")
- file { "${conf_dir}/jetty.xml":
+ file { 'jetty.xml':
+ path => "${conf_dir}/jetty.xml",
ensure => file,
owner => 'odl',
content => template('opendaylight/jetty.xml.erb')
@@ -71,6 +78,7 @@ class opendaylight::install (
Package[$odl_package] ->
Ini_setting <||> ->
Firewall <||> ->
- File <||> ->
+ File['jetty.xml'] ->
+ Class['opendaylight::leveldbjni'] ->
Service['opendaylight']
}
diff --git a/deployment_scripts/puppet/modules/opendaylight/manifests/leveldbjni.pp b/deployment_scripts/puppet/modules/opendaylight/manifests/leveldbjni.pp
new file mode 100644
index 0000000..ed97c5d
--- /dev/null
+++ b/deployment_scripts/puppet/modules/opendaylight/manifests/leveldbjni.pp
@@ -0,0 +1,25 @@
+# == Class opendaylight::leveldbjni
+#
+# Manages patching of JNI for leveldb on arm64.
+#
+# It fetches a prebuilt DEB package containing leveldbjni,
+# patched so that it's properly detected by maven on arm64 systems.
+#
+# DEB: http://linux.enea.com/mos-repos/ubuntu/9.0/ \
+# pool/main/a/armband-odl-leveldb-fix/
+# JIRA: https://jira.opnfv.org/browse/ARMBAND-114
+#
+class opendaylight::leveldbjni {
+ case $::osfamily {
+ 'Debian', 'Ubuntu': {}
+ default: {
+ fail('Not supported on OS other than Debian based.')
+ }
+ }
+
+ if ! defined(Package['armband-odl-leveldb-fix']) {
+ package { 'armband-odl-leveldb-fix':
+ ensure => 'present',
+ }
+ }
+}
|