RDK Resources
RDK Preferred
Code Management Facility
RDK Forums
[RDK Conferences]
RDK Support
Archives
Papers & Presentations Archive
Table of Contents |
---|
Webconfig is a configuration management server from which RDK devices download configurations during bootup or when updates are available. The project is written in Go and has been open-sourced to the RDK community. You can find it here: https://github.com/rdkcentral/webconfig/blob/develop/README.md. The objective is to set up the Webconfig server using the open-sourced repository, so that it can be used by the RDK reference platform."
**Note - All tests mentioned in this page are done on RDK-B device ( Rpi4 )
Code Block |
---|
~$ sudo wget https://golang.org/dl/go1.20.3.linux-amd64.tar.gz ~$ sudo tar -C /usr/local -xzf go1.20.3.linux-amd64.tar.gz ~$ ls /usr/local/go/bin/ go gofmt ~# go version go version go1.20.3 linux/amd64 ~# java -version openjdk version "11.0.18" 2023-01-17 OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu122.04) OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing) ~# ~# echo "deb https://debian.cassandra.apache.org 41x main" | sudo tee -a /etc/apt/sources.list.d/cassandra.sources.list deb https://debian.cassandra.apache.org 41x main ~# ~# curl https://downloads.apache.org/cassandra/KEYS | sudo apt-key add % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)). 100 274k 100 274k 0 0 193k 0 0:00:01 0:00:01 --:--:-- 193k OK ~# sudo apt-get update ~# sudo apt-get install cassandra ~# ls /usr/sbin/cassandra ~# cassandra -v 4.1.1 :~# ps -ef | grep cassa cassand+ 222987 1 0 May04 ? 02:01:43 /usr/bin/java |
Code Block |
---|
$ export WEBCONFIG_KEY=`head -c 32 /dev/random | base64` $ mkdir -p /app/logs/webconfig $ cd /go/src/github.com/rdkcentral/webconfig $ make $ bin/webconfig-linux-amd64 -f config/sample_webconfig.conf |
** Note:
After build, modify "config/sample_webconfig.conf" based on the server ip and port detail
Code Block |
---|
curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/privatessid" -H 'Content-type: application/msgpack' --data-binary @privatessid.msgpack -X POST curl -s -i "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/document/mocalan" -H 'Content-type: application/msgpack' --data-binary @moca@lan.msgpack -X POST |
Code Block |
---|
cqlsh:webconfig> select * from xpc_group_config where cpe_mac='D83ADD0D178F'; cpe_mac | group_id | error_code | error_details | expiry | params | payload | state | updated_time | version --------------+-------------+------------+---------------+--------+--------+------------------------------------------------------------------------------------------------------------------------------------+-------+---------------------------------+----------- D83ADD0D178F | moca | null | null | null | null | 0x81a6456e61626c65a474727565 | 2 | 2023-05-16 23:48:41.941000+0000 | 683076856 D83ADD0D178F | privatessid | 0 | | null | null | 0x8c105971de71bd30ae8a6d0fb10973174a97a0da0bd372b87f2342c132c554421de36916a06721d18cc1226d2a830b4af4297aa91611af89de4bf78b59859707 | 2 | 2023-05-16 23:48:24.845000+0000 | 563331257 (2 rows) cqlsh:webconfig> |
Code Block |
---|
~# curl -s "http://webconfig.rdkcentral.com:9007/api/v1/device/d83add0d178f/config" --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI Content-type: application/msgpack Etag: 683076856 Namespace: moca ▒▒Enable▒true --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI Content-type: application/msgpack Etag: 563331257 Namespace: privatessid ▒▒2.4▒rdkm_2.4▒5▒rdkm_5 --2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI-- |
Verify data is in DB by following "Set Data to DB" section. Below results are pulled for "lan" subdoc with below values
Code Block |
---|
"lan": {
"DhcpServerEnable": True,
"LanIPAddress": "10.0.0.1",
"LanSubnetMask": "255.255.255.0",
"DhcpStartIPAddress": "10.0.0.7",
"DhcpEndIPAddress": "10.0.0.249",
"LeaseTime": 3600
}
|
Code Block |
---|
root@Docsis-Gateway:~# dmcli eRT getv Device.X_RDK_WebConfig. CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. getv from/to component(webconfig): Device.X_RDK_WebConfig. Execution succeed. Parameter 1 name: Device.X_RDK_WebConfig.RfcEnable type: bool, value: true Parameter 2 name: Device.X_RDK_WebConfig.URL type: string, value: http://webconfig.rdkcentral.com:9007/api/v1/device/e45f0156ff0e/config |
Code Block |
---|
root@RaspberryPi-Gateway:~# dmcli eRT setv Device.X_RDK_WebConfig.ForceSync string root CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. setv from/to component(webconfig): Device.X_RDK_WebConfig.ForceSync Execution succeed. |
Code Block |
---|
230524-20:50:50.019046 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: curl Ip resolve option set as default mode 230524-20:50:50.386953 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: g_ETAG updated for primary sync is 3515477887 230524-20:50:50.387148 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: webConfig curl response 0 http_code 200 230524-20:50:50.387228 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: curl response Time: 0.4 seconds 230524-20:50:50.387305 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: ct is multipart/mixed; boundary=2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI, content_res is 0 230524-20:50:50.387368 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Content-Type is multipart/mixed. Valid 230524-20:50:50.387823 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Size of the docs is :1 230524-20:50:50.387927 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc root is updated to version 3515477887 status pending error_details none error_code 0 trans_id 0 temp->retry_count 0 230524-20:50:50.388001 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Added 2 mp entries To tmp List 230524-20:50:50.388067 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: node is pointing to temp->name root temp->version 3515477887 temp->status pending temp->error_details none 230524-20:50:50.388131 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: node is pointing to temp->name lan temp->version 4270650766 temp->status pending_apply temp->error_details none 230524-20:50:50.388201 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc lan is updated to version 4270650766 status pending error_details none error_code 0 trans_id 0 temp->retry_count 0 230524-20:50:50.388866 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: subdoc_name: lan, version: 4270650766, transaction_id: 29118 230524-20:50:50.389014 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: doc lan is updated to version 4270650766 status pending error_details none error_code 0 trans_id 29118 temp->retry_count 0 230524-20:50:50.389082 [mod=WEBCONFIG, lvl=INFO] [tid=2869] WEBCONFIG: Request:> param[0].name = Device.DHCPv4.Server.Lan, type = 5 230524-20:50:50.393169 [mod=WEBCONFIG, lvl=INFO] [tid=27441] WEBCONFIG: Received msg lan,29118,4270650766,ACK,13 from topic webconfigSignal 230524-20:50:50.393263 [mod=WEBCONFIG, lvl=INFO] [tid=27441] WEBCONFIG: Received webconfig event signal Info |
Code Block |
---|
230524-20:50:50.391013 [mod=PAM, lvl=WARN] [tid=1671] base64 decoded data contains 190 bytes 230524-20:50:50.391083 [mod=PAM, lvl=WARN] [tid=1671] Base64 decode Elapsed time : 0 ms 230524-20:50:50.391156 [mod=PAM, lvl=WARN] [tid=1671] MSGPACK_UNPACK_SUCCESS :2 230524-20:50:50.391239 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->entries_count is 1 230524-20:50:50.391303 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->subdoc_name is lan 230524-20:50:50.391367 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->version is 4270650766 230524-20:50:50.391431 [mod=PAM, lvl=WARN] [tid=1671] pLanInfo->transaction_id is 29118 230524-20:50:50.391494 [mod=PAM, lvl=WARN] [tid=1671] Lan configuration received 230524-20:50:50.391563 [mod=PAM, lvl=INFO] [tid=1671] PushBlobRequest : subdoc_name lan , txid 29118, version 4270650766 , entries 1 |
Code Block |
---|
root@RaspberryPi-Gateway:~# cat /rdklogs/logs/WEBCONFIGlog.txt.0 CR component name is: eRT.com.cisco.spvtg.ccsp.CR subsystem_prefix eRT. setv from/to component(webconfig): Device.X_RDK_WebConfig.ForceSync Execution succeed. root@RaspberryPi-Gateway:~# 230518-19:59:56.595249 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Received poke request, proceed to parseForceSyncJson 230518-19:59:56.595416 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Force sync json parsed: [privatessid] 230518-19:59:56.595493 [mod=WEBCONFIG, lvl=INFO] [tid=5737] WEBCONFIG: Trigger force sync 230518-19:59:56.595644 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ForceSyncDoc privatessid ForceSyncTransID. 230518-19:59:56.622941 WEBCONFIG: read file script is called 230518-19:59:56.631238 WEBCONFIG: CURL_RESPONSE path is /tmp/.cURLresponse 230518-19:59:56.634573 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Failed to read token from /etc/parodus/parodus_read_file.sh. Proceeding to create new token. 230518-19:59:56.670815 WEBCONFIG: No /nvram/certs/devicecert_1.pk12 using static cert 230518-19:59:56.680418 WEBCONFIG: No /usr/bin/GetConfigFile to fetch /tmp/.cfgStaticxpki 230518-19:59:56.689169 WEBCONFIG: Failure configuration file missing 230518-19:59:56.691845 [mod=WEBCONFIG, lvl=ERROR] [tid=5878] WEBCONFIG: Failed to create new token 230518-19:59:56.691963 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: reboot reason is unknown 230518-19:59:56.692087 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: versionsList is NONE-REBOOT 230518-19:59:56.692158 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: version_header formed IF-NONE-MATCH:NONE-REBOOT 230518-19:59:56.692225 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: schema_header formed Schema-Version: v1.0 230518-19:59:56.692289 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: supportedVersion fetched is NULL 230518-19:59:56.692352 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: supportedDocs_header formed X-System-Supported-Docs: 16777247,33554435,50331649,67108865,83886081,100663297,117440513,134217729,201326594,218103809,251658241 230518-19:59:56.692427 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: bootTime_header formed X-System-Boot-Time: 1684439782 230518-19:59:56.692494 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: FwVersion_header formed X-System-Firmware-Version: rdkb-generic-broadband-image_rdk-next_20230511162210 230518-19:59:56.692560 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: status_header formed X-System-Status: Operational 230518-19:59:56.692631 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: currentTime_header formed X-System-Current-Time: 1684439996 230518-19:59:56.692697 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: systemReadyTime_header formed X-System-Ready-Time: 1684439892 230518-19:59:56.692827 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: uuid_header formed Transaction-ID: 825e8635-2f91-4bcf-88d7-97c92b588e40 230518-19:59:56.692894 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: productClass_header formed X-System-Product-Class: XB3 230518-19:59:56.692963 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ModelName_header formed X-System-Model-Name: RPI 230518-19:59:56.693028 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: The get_global_supplementarySync() is 0 230518-19:59:56.697086 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: docList is root 230518-19:59:56.697189 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Webconfig root ConfigURL is http://webconfig.rdkcentral.com:9007/api/v1/device/e45f0156ff0e/config?group_id=root 230518-19:59:56.697265 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: g_interface fetched is erouter0 230518-19:59:56.697343 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: curl Ip resolve option set as default mode 230518-19:59:57.023404 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: g_ETAG updated for primary sync is 1883965250 230518-19:59:57.023608 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: webConfig curl response 0 http_code 200 230518-19:59:57.023767 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: curl response Time: 0.3 seconds 230518-19:59:57.023847 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: ct is multipart/mixed; boundary=2xKIxjfJuErFW+hmNCwEoMoY8I+ECM9efrV6EI4efSSW9QjI, content_res is 0 230518-19:59:57.023912 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Content-Type is multipart/mixed. Valid 230518-19:59:57.024303 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: Size of the docs is :1 230518-19:59:57.024415 [mod=WEBCONFIG, lvl=ERROR] [tid=5878] WEBCONFIG: Multipart list is empty 230518-19:59:57.024518 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: dest is event:subdoc-report/privatessid/mac:e45f0156ff0e/status 230518-19:59:57.024638 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: The Maintenance Sync triggers at Fri 230519 02:01:29 230518-19:59:57.024728 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: stringifiedNotifyPayload is {"device_id":"mac:e45f0156ff0e","namespace":"privatessid","application_status":"failed","error_code":311,"error_details":"multipart_cache_NULL","transaction_uuid":"unknown","version":"0"} 230518-19:59:57.024792 [mod=WEBCONFIG, lvl=INFO] [tid=5878] WEBCONFIG: reset maintenanceSync to false 230518-19:59:57.025021 [mod=WEBCONFIG, lvl=INFO] [tid=5879] WEBCONFIG: Notification successfully sent to Webconfig.Upstream [ 216.048167] sh[9497]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0. [ 216.074517] sh[9498]: interface wlan1 does not exist! [ 226.262396] sh[10157]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0. [ 226.289465] sh[10158]: interface wlan1 does not exist! [ 236.478289] sh[10362]: device wlan0 is already a member of a bridge; can't enslave it to bridge brlan0. [ 236.503898] sh[10363]: interface wlan1 does not exist! [ 239.775543] audit: type=1701 audit(1684440023.027:82): auid=4294967295 uid=0 gid=0 ses=4294967295 pid=10420 comm="irq0" exe="/home/root/irq0" sig=11 res=1 [ 239.807159] audit: type=1701 audit(1684440023.057 |
RDK Feature test