Browse Source

Merge "Variable Substitution Initial Specification"

Zuul 5 months ago
parent
commit
d7732f0238
1 changed files with 176 additions and 0 deletions
  1. 176
    0
      specs/2019.03/approved/multi-os-2004039-variable-substitution.rst

+ 176
- 0
specs/2019.03/approved/multi-os-2004039-variable-substitution.rst View File

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

Loading…
Cancel
Save