86a9ab6a7b
5 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Sachin Holla
|
ba6aba2b92
|
[mgmt-framework] Fix rest-server startup script (#14979)
This script was using 'null' as default value for all optional fields of REST_SERVER table -- due to incorrect use of 'jq -r' command. Server was not coming up when REST_SERVER entry exists but some fields were not given (which is a valid configuration). Fixed the jq query expression to return empty string for non existing fields. Signed-off-by: Sachin Holla <sachin.holla@broadcom.com> |
||
Tamer Ahmed
|
3197c2dfac |
[mgmt-framework] Call sonic-cfggen Once (#4937)
Optimizing number of calls made to sonic-cfggen during service start up as it adds to total system boot up time. ***-Test 1*** there is an average saving of 1 to 1.5 sec between old script and new script ``` root@str-s6000-acs-14:/# time /usr/bin/rest-server-old.sh Generating temporary TLS server certificate ... 2020/07/09 19:03:33 wrote cert.pem 2020/07/09 19:03:33 wrote key.pem REST_SERVER_ARGS = -ui /rest_ui -logtostderr -cert /tmp/cert.pem -key /tmp/key.pem /usr/sbin/rest_server -ui /rest_ui -logtostderr -cert /tmp/cert.pem -key /tmp/key.pem real 0m8.790s user 0m7.993s sys 0m0.584s root@str-s6000-acs-14:/# time /usr/bin/rest-server-new.sh Generating temporary TLS server certificate ... 2020/07/09 19:03:45 wrote cert.pem 2020/07/09 19:03:45 wrote key.pem REST_SERVER_ARGS = -ui /rest_ui -logtostderr -cert /tmp/cert.pem -key /tmp/key.pem /usr/sbin/rest_server -ui /rest_ui -logtostderr -cert /tmp/cert.pem -key /tmp/key.pem real 0m6.940s user 0m5.670s sys 0m0.386s ``` ***-Test 2*** Built an image with this change and rest server is running with params as described in test 1 above ``` admin@str-s6000-acs-14:~$ ps -ef | grep rest_server root 3301 2866 2 02:09 pts/0 00:00:10 /usr/sbin/rest_server -ui /rest_ui -logtostderr -cert /tmp/cert.pem -key /tmp/key.pem ``` signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com> |
||
Sachin Holla
|
3dc7992a6e
|
[mgmt-framework]: REST server cert configurations (#4799)
REST and telemetry servers were using "DEVICE_METADATA|x509" table for server certificate configurations. This table has been deprecated now. Enhanced REST server startup script to read server certificate file path configurations from REST_SERVER table. Three more attributes - server_crt, server_key and ca_crt are introduced as described in https://github.com/Azure/SONiC/pull/550. For backard compatibility, certificate configurations are read from old "DEVICE_METADATA|x509" table if they (server_crt, server_key and ca_crt) are not present in REST_SERVER table. Fixes bug https://github.com/Azure/sonic-buildimage/issues/4291 Signed-off-by: Sachin Holla <sachin.holla@broadcom.com> |
||
Partha Dutta
|
2cfdb28367
|
[mgmt-framework]: Removing explicit libyang plugin path settings (#4144)
Removing explicit libyang plugin path settings. Libyang debian package installs the extensions in standard location. Libyang debian package installs the extensions in standard location as per build time configuration (install prefix is set in patch/libyang.patch). If plugin directory is not set, libyang explicitly searches the plugins in LYEXT_PLUGINS_DIR which is populated during build. The plugins are installed in LYEXT_PLUGINS_DIR itself through debian package installation. $ grep -nr LYEXT_PLUGINS_DIR src/ src/plugin_config.h.in:18:#define LYEXT_PLUGINS_DIR "@EXTENSIONS_PLUGINS_DIR_MACRO@" /**< directory with YANG extension plugins */ src/plugins.c:420: pluginsdir = LYEXT_PLUGINS_DIR; |
||
Prabhu Sreenivasan
|
87f70108cb |
SONiC Management Framework Release 1.0 (#3488)
* Added sonic-mgmt-framework as submodule / docker * fix build issues * update sonic-mgmt-framework submodule branch to master * Merged changes 70007e6d2ba3a4c0b371cd693ccc63e0a8906e77..00d4fcfed6a759e40d7b92120ea0ee1f08300fc6 00d4fcfed6a759e40d7b92120ea0ee1f08300fc6 Modified environemnt variables * Changes to build sonic-mgmt-framework docker * bumped up sonic-mgmt-framework commit-id * version bump for sonic-mgmt-framework commit-it * bumped up sonic-mgmt-framework commit-id * Add python packages to docker * Build fix for docker with python packages * added libyang as dependent package * Allow building images on NFS-mounted clones Prior to this change, `build_debian.sh` would generate a Debian filesystem in `./fsroot`. This needs root permissions, and one of the tests that is performed is whether the user can create a character special file in the filesystem (using mknod). On most NFS deployments, `root` is the least privileged user, and cannot run mknod. Also, attempting to run commands like rm or mv as root would fail due to permission errors, since the root user gets mapped to an unprivileged user like `nobody`. This commit changes the location of the Debian filesystem to `/fsroot`, which is a tmpfs mount within the slave Docker. The default squashfs, docker tarball and zip files are also created within /tmp, before being copied back to /sonic as the regular user. The side effect of this change is that the contents of `/fsroot` are no longer available once the slave container exits, however they are available within the squashfs image. Signed-off-by: Nirenjan Krishnan <Nirenjan.Krishnan@dell.com> * bumped up sonc-mgmt-framework commit to include PR #18 * REST Server startup script is enahnced to read the settings from ConfigDB. Below table provides mapping of db field to command line argument name. ============================================================ ConfigDB entry key Field name REST Server argument ============================================================ REST_SERVER|default port -port REST_SERVER|default client_auth -client_auth REST_SERVER|default log_level -v DEVICE_METADATA|x509 server_crt -cert DEVICE_METADATA|x509 server_key -key DEVICE_METADATA|x509 ca_crt -cacert ============================================================ * Replace src/telemetry as submodule to sonic-telemetry * Update telemetry commit HEAD * Update sonic-telemetry commit HEAD * libyang env path update * Add libyang dependency to telemetry * Add scripts to create JSON files for CLI backend Scripts to create /var/platform/syseeprom and /var/platform/system, which are back-end files for CLI, for system EEPROM and system information. Signed-off-by: Howard Persh <Howard_Persh@dell.com> * In startup script, create directory where CLI back-end files live Signed-off-by: Howard Persh <Howard_Persh@dell.com> * build dependency pkgs added to docker for build failure fix * Changes to fix build issue for mgmt framework * Fix exec path issue with telemetry * s5232[device] PSU detecttion and default led state support * Processing of first boot in rc.local should not have premature exit Signed-off-by: Howard Persh <Howard_Persh@dell.com> * docker mount options added for platform, system features * bumped up sonic-mgmt-framework commit id to pick 23rd July 2019 changes * Added mount options for telemetry docker to get access for system and platform info. * Update commit for sonic-utilities * [dell]: Corrected dport map and renamed config files for S5232F * Fix telemetry submodule commit * added support for sonic-cli console * [Dell S5232F, Z9264F] Harden FPGA driver kernel module For Dell S5232F and Z9264F platforms, be more strict when checking state in ISR of FPGA driver, to harden against spurious interrupts. Signed-off-by: Howard Persh <Howard_Persh@dell.com> * update mgmt-framework submodule to 27th Aug commit. * remove changes not related to mgmt-framework and sonic-telemetry * Revert "Replace src/telemetry as submodule to sonic-telemetry" This reverts commit |