Add SM support for the DC admin network
This commit adds SM support for the DC admin network.
The admin network is intended to be used between a subcloud
and system controller. Because the (existing) management network
is so embedded in other parts of the StarlingX system, it makes
it prohibitively hard to re-configure this network after initial
installation. The admin network is intended to be isolated from
the management network, allowing re-configuration of the network
parameters in the case that the physical network between subcloud
and system controller has been changed.
In the case of admin network usage, the management network still
exist but is a private network in the context of a subcloud.
This specific commit provides for admin-ip and admin-interface
services to be added to the SM database and be recognized in
processing similar to the management, cluster-host, oam, etc
networks.
Since there is a requirement for the admin IP subnet information
to be allowed to change at runtime, in-service updating of SM
information relating to the admin-ip service (floating IP), as
well as unicast heartbeating between peers is also added in this
commit.
Testing:
AIO-SX:
- admin-ip service is enabled when the admin network is
created.
- admin-ip service is not enabled when the admin network is
not created.
- floating-ip is updated on the admin interface when admin
addr-pool information is changed.
AIO-DX:
- admin-ip service is enabled when the admin network is
created.
- admin-ip service is not enabled when the admin network
is not created.
- floating-ip is updated on the active-controller when the
admin addr-pool information is changed.
- When a peer admin interface is down, an alarm is raised.
- When a peer admin IP is not correct (changed), an alarm
is raised.
- Swact between controllers.
- Inactive controller admin interface goes down
Result: A 400.005 major communication loss fault is generated
for the inactive controller entity
- Inactive controller admin interface comes back up
Result: The fault is cleared
- Inactive controller admin IP address is removed/changed
Result: Two 400.005 major communication loss faults are
generated for both controller entities
- Inactive controller admin node IP address is re-applied
Result: The faults are cleared
- Active admin interface goes down
Result: A 400.005 major communication loss fault is generated
for the inactive controller entity. A swact is not
issued.
- Active admin interface comes back up
Result: The fault is cleared
- Active admin node IP address is removed/changed
Result: Two 400.005 major communication loss faults are
generated for both controller entities.
A swact is not issued.
- Active admin floating IP address is removed/changed
Result: A 400.001 critical admin-services / admin-ip alarm
is raised.
A swact occurs.
The floating admin IP is applied to the newly active
controller. Alarms are cleared.
- After the above test, the newly active controller swacts back
to the previously active controller.
Result: No alarms.
The floating IP is applied to the newly active
controller.
- The cable for the management interface on the active controller
is pulled
Result: A swact occurs
- The cable for the OAM interface on the active controller
is pulled
Result: A swact occurs
- The cable for the Admin interface on the active controller
is pulled
Result: A swact occurs. 400.005 alarms are raised.
- The mgmt, cluster-host, oam interfaces are all brought down/up at
the same time. The admin interface is also brought down,
but not brought back up
back up.
Result: A swact occurs, with multiple controller-services
related to the mgmt interface being in degraded state.
Story: 2010319
Task: 47278
Signed-off-by: Steven Webster <steven.webster@windriver.com>
Change-Id: I65df52600f4d5c499dceed32739cab414d36847a
The Debian packaging has been changed to reflect all the
git commits under the directory, and not just the commits
to the metadata folder.
This ensures that any new code submissions under those
directories will increment the versions.
Test Plan:
PASS: build-pkgs -p sm-common
PASS: build-pkgs -p sm-db
PASS: build-pkgs -p sm
PASS: build-pkgs -p sm-api
PASS: build-pkgs -p sm-client
PASS: build-pkgs -p sm-tools
PASS: build-pkgs -p stx-ocf-scripts
Story: 2010550
Task: 47341
Signed-off-by: Luis Sampaio <luis.sampaio@windriver.com>
Change-Id: I54cde0fe252c3bcef669969a1b0675a2df8b3d69
Make sure that the python is installed correctly.
Test Plan
PASS Build and test ISO.
Story: 2009101
Task: 43644
Signed-off-by: Chuck Short <charles.short@windriver.com>
Change-Id: I1bd2938b2fb861a2281fc6a3f3bf3f5408ccbb86
- Use six.moves for urllib2
- Use six.moves.xmlrpc_client
- Use six.moves.zip
- Adapt gettextutils
- Fix set() order dismatch for python 2/3
- Change dict key to list
Test:
- Build RPM with applied changes.
- Installed simplex controller checked to see if sm-api was running.
Story: 2006796
Task: 42388
Signed-off-by: Charles Short <charles.short@windriver.com>
Change-Id: I29a81755f732b55f67321748604b2e5d951935c9
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
(cherry picked from commit cdc4757a46)
Update remaining StarlingX packages with hardcoded TIS_PATCH_VER to
use PKG_GITREVCOUNT where possible, with offsets as needed to ensure
the version is incremented above the hardcoded version.
Story: 2008455
Task: 41447
Signed-off-by: Don Penney <don.penney@windriver.com>
Change-Id: Idf5ef476192cdf4923d6c903f1a15e03cfe9d03f
Using command: sudo sm-dump --impact --pid --pid_file
pid column is not formatted properly and there is no space
between pid and pid_file, this is due to pid's in linux can
have up to 7 characters.
This commit:
a) Increases this field to 8 characters in order to fix format
Test:
Use "sudo sm-dump --impact --pid --pid_file"
Closes-Bug: 1828045
Change-Id: I3966f12f68c6694078f8670962c0d4113b8820c6
Signed-off-by: Hayde Martinez <hayde.martinez.landa@intel.com>
Add "--apply" command option for sm-provision and sm-deprovision
commands to apply the change to SM immediately.
If SM runtime configuration has not already been created, the new option
will not do extra. SM will load the up-to-date configuration from static
db when it creates runtime configuration.
The new commands:
sm-provision service-group-member
sm-deprovision service-group-member
will provision/deprovision both service and service group member.
The commands below are now deprecated, although they are still supported
for backward compatibility.
sm-provision service
sm-deprovision service
Story: 2005486
Task: 30622
Depends-on: https://review.opendev.org/#/c/655766
Change-Id: I6dda4129ab1d121a7e5861d20a4df791c0c535a8
Signed-off-by: Bin Qian <bin.qian@windriver.com>
Added service domain for cluster host interface and service for
cluster host IP in the SM database.
Removed references of infrastructure interface.
Story: 2004273
Task: 29474
Change-Id: I6223047e9453eba83ea8b4ecf4db739d0f7d7665
Signed-off-by: Teresa Ho <teresa.ho@windriver.com>
In some cases sm will need to adjust its process priority. This
change enables the configuring sm priority as part of sm at runtime
Partial-Bug: 1816764
Change-Id: I860759621c0d1389ca5a3c947d7973c185274bdd
Signed-off-by: Bin Qian <bin.qian@windriver.com>
the old source code which populate "V1" tables are no longer being used
in the current stx-ha design architecture.
Remove list:
service-mgmt/sm-db-1.0.0/upgrades/
service-mgmt/sm-db-1.0.0/scripts/sm-db-populate.script
service-mgmt/sm-db-1.0.0/patches/*install.patch
service-mgmt/sm-db-1.0.0/database/sm_database.xlsb
service-mgmt-tools/sm-tools/sm-tools/sm-patch.py
Story: 2004752
Task: 28842
Change-Id: I9f230f900baafcb8495d8f7ed739bf8e182abae5
Signed-off-by: SidneyAn <ran1.an@intel.com>
below issures are removed from ignore cases:
E114 indentation is not a multiple of four (comment)
E116 unexpected indentation (comment)
E121 continuation line under-indented for hanging indent
E122 continuation line missing indentation or outdented
E123 closing bracket does not match indentation of opening bracket's line
E124 closing bracket does not match visual indentation
E125 continuation line with same indent as next logical line
E126 continuation line over-indented for hanging indent
E127 continuation line over-indented for visual indent
E128 continuation line under-indented for visual indent
E129 visually indented line with same indent as next logical line
E131 continuation line unaligned for hanging indent
E201 whitespace after '('
E228 missing whitespace around modulo operator
E231 missing whitespace after ','
E241 multiple spaces after ':'
E251 unexpected spaces around keyword / parameter equals
E265 block comment should start with '#'
E271 multiple spaces after keyword
E302 expected 2 blank lines, found 1
E303 too many blank lines
E305 expected 2 blank lines after class or function definition, found 1
E704 multiple statements on one line (def)
E713 test for membership should be 'not in'
E714 test for object identity should be 'is not'
E722 do not use bare except'
E731 do not assign a lambda expression, use a def
E999 SyntaxError: invalid syntax (this is likely python3)
F401 <foo> imported but unused
F841 local variable 'foo' is assigned to but never used
H201: no 'except:'
H233: Python 3.x incompatible use of print operator
B001 Do not use bare `except:`
B004 Using `hasattr(x, '__call__')` to test
if `x` is callable is unreliable.
B305 `.next()` is not a thing on Python 3. Use the `next()` builtin.
B306 `BaseException.message` has been deprecated as of Python 2.6
and is removed in Python 3.
B007 Loop control variable 'key' not used within the loop body.
remain below issues in ignores:
E402 module level import not at top of file
./service-mgmt-api/sm-api/sm_api/cmd/__init__.py:25
Hxxx since which are related with document format
F811 redefinition of unused '<foo>' from line <x>
./service-mgmt-tools/sm-tools/sm_tools/sm_configure.py:18
F821 undefined name 'e'
./service-mgmt-api/sm-api/sm_api/common/utils.py:448
B006 Do not use mutable data structures for argument defaults.
./service-mgmt-api/sm-api/sm_api/common/service.py:59
B008 Do not perform calls in argument defaults.
./service-mgmt-api/sm-api/sm_api/openstack/common/timeutils.py:117
Test have been done:Build,Deploy,some smc command,such as smc service-list,
smc service-show, sm-dump, etc
Story: 2003430
Task: 26524
Change-Id: I3e2a4a31f87e3ff66cfce86f54285e830ee1c3dc
Signed-off-by: Sun Austin <austin.sun@intel.com>
Add default of 2 new system configurations to sm.db.
Add configuration code to enable configure the options.
Story: 2003577
Task: 27727
Change-Id: I1a3dbaec78de591ef0de75ef9cafab48bcbb4dbf
Signed-off-by: Bin Qian <bin.qian@windriver.com>
This update adds hooks to the spec files for the following packages
to generate wheels for the python modules:
- sm-api
- sm-client
- sm-tools
Change-Id: If6ebbdaaad5ee7623cbbaa07b48d216461a16dec
Story: 2003907
Task: 27527
Signed-off-by: Don Penney <don.penney@windriver.com>
change "except ValueError, e:"
to "except ValueError as e:"
and remove tox H231 from ignore for pep8 check
Story:2003430
Task: 26522
Change-Id: I06c7646c375ada7f8f06f870a7bdb0d7fc282e5a
Signed-off-by: Sun Austin <austin.sun@intel.com>
The W291,W292,W391,W503,W601 warnings were fixed and
tox.ini updated accordingly.
Story: 2002803
Task: 26911
Change-Id: I1e5f0b1f72b06ad8b5cac07921e9d14171623ba0
Signed-off-by: Erich Cordoba <erich.cordoba.malibran@intel.com>
In Python 3 print is a function.
Especially for multiple string print, need to import
print_function from __future__.
Story: 2003430
Task: 24915
Signed-off: zhangyangyang <zhangyangyang@unionpay.com>
Change-Id: I40ae72b8efb7b342489ad2191ad02b0a5fb2898f
Delay starting compute services until controller services are up. Add
new sm-query service-group support for the compute_config to determine
all controller service groups are enabled.
Change-Id: Ie5a5c941076d1295aabde40361bdaca9bcf3bfe1
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>