summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-11-06 19:32:35 +0000
committerGerrit Code Review <review@openstack.org>2018-11-06 19:32:35 +0000
commitd7732f0238c0b5b09d8cf3ea8fc93c5e49624508 (patch)
treefac1e422af6dc2571f821571458e20f16e904d7d
parent5676cbd92be1a9e6b75c0bfa3f155ae158a8771a (diff)
parentdcdd5f852bb20b170ad543ebb2faa23c1e44057e (diff)
Merge "Variable Substitution Initial Specification"
-rw-r--r--specs/2019.03/approved/multi-os-2004039-variable-substitution.rst176
1 files changed, 176 insertions, 0 deletions
diff --git a/specs/2019.03/approved/multi-os-2004039-variable-substitution.rst b/specs/2019.03/approved/multi-os-2004039-variable-substitution.rst
new file mode 100644
index 0000000..ebaecf3
--- /dev/null
+++ b/specs/2019.03/approved/multi-os-2004039-variable-substitution.rst
@@ -0,0 +1,176 @@
1..
2 This work is licensed under a Creative Commons Attribution 3.0 Unported
3 License. http://creativecommons.org/licenses/by/3.0/legalcode
4
5===============================================
6StarlingX: Variable Subsitution of System Paths
7===============================================
8
9Storyboard:
10https://storyboard.openstack.org/#!/story/2004039
11
12The Multi-OS effort requires that we can modify the locations that some
13files might be found during installation and later for configuration. While
14the Linux Standard Base (LSB) includes the Filesystem Hierarchy Standard
15(FHS) not all Linux distributions follow it exactly, therefore there can be
16differences.
17
18Problem description
19===================
20
21Many scripts and configuration files hardcode certain paths and filenames,
22depending on the Linux distribution these may not be accurate from one
23distribution to the next. By providing a mechanism for variable substitution
24during build, installation or update, this problem can be addressed.
25
26Use Cases
27=========
28
29This is for the Developer and system level engineer working on implementing
30changes to support OS independence in the StarlingX service (Flock) and
31system level configuration files contained within StarlingX stx repos.
32
33Proposed change
34===============
35
36Using the existing naming conventions, change the existing hardcode paths
37to the common naming convention and then do substitution via sed or other
38tool as appropriate. This renaming could occur in any source or configuration
39file, not limited to Makefiles, .ini, .config, or scripts.
40
41Examples:
42
43RPM Variable Make Variable Substitution Variable
44%{_sysconfdir} SYSCONFDIR @SYSCONFDIR@
45%{_buildroot} DESTDIR @DESTDIR@
46%{pythonroot} PYTHONROOT @PYTHONROOT@
47
48Posting to get preliminary feedback on the scope of this spec.
49
50Alternatives
51============
52
53None
54
55Data model impact
56=================
57
58None
59
60REST API impact
61===============
62
63None
64
65Security impact
66===============
67
68None
69
70Other end user impact
71=====================
72
73None
74
75Performance Impact
76==================
77
78None
79
80Other deployer impact
81=====================
82
83No additional configuration options are being added, but existing ones may
84change based on how the variables are substituted.
85
86Developer impact
87=================
88
89Developers will need to be aware of the variables and how they get substituted
90and added. This can be addressed in the Developer Guide Wiki.
91
92Upgrade impact
93===============
94
95None
96
97
98Implementation
99==============
100
101Assignee(s)
102===========
103
104Primary assignee:
105 Shuicheng Lin (shuicheng)
106
107Other contributors:
108 Mingyuan Qi
109 Zhipeng Liu
110 Saul Wold (sgw-starlingx)
111
112
113Repos Impacted
114==============
115
116stx-clients
117stx-config
118stx-fault
119stx-gui
120stx-ha
121stx-integ
122stx-metal
123stx-nfv
124stx-update
125stx-upstream
126
127
128Work Items
129===========
130
131Initial work:
132 * https://storyboard.openstack.org/#!/story/2004039
133
134 #. Task: 27043 stx-nfv: contains hardcoded path to /etc and
135 /usr/lib64/python2.7
136
137Ongoing Discovery
138 * Create additional tasks in the 2004039 Story as we discover additional
139 hardcoded paths that need substitution.
140 * Ensure that the StarlingX services are using the correct LSB/FHS directory
141 structure as implemented by the upstream distribution (this can still vary
142 slightly).
143
144Dependencies
145============
146
147None
148
149Testing
150=======
151
152Verify configuration is correct before and after the change and test that the
153resulting system boots correctly and has the correct configuration.
154
155Documentation Impact
156====================
157
158Developer Guide Wiki will need to be updated to list the canonical variables
159and their default paths.
160
161References
162==========
163
164Linux Standard Base: https://wiki.linuxfoundation.org/lsb/start
165Hierarchy Filesystem Standard: https://wiki.linuxfoundation.org/lsb/fhs
166
167History
168=======
169
170.. list-table:: Revisions
171 :header-rows: 1
172
173 * - Release Name
174 - Description
175 * - 2019.03
176 - Introduced