This bugfix covers corner cases when you add an Adhoc host via API then add the respective host to a host group, then mesh config.
The error encountered when loading mesh config:
Thu May 02 2024 05:19:14 GMT+0000 (Coordinated Universal Time) - ESC[31merrorESC[39m: Thu, 02 May 2024 05:19:14 GMT uncaughtException: Cannot read properties of undefined (reading 'location-country')
Thu May 02 2024 05:19:14 GMT+0000 (Coordinated Universal Time) - ESC[31merrorESC[39m: TypeError: Cannot read properties of undefined (reading 'location-country')
at /usr/lib/perfsonar/psconfig-web-admin/pub/api/pub/meshconfig.js:989:50
at Array.forEach (<anonymous>)
at /usr/lib/perfsonar/psconfig-web-admin/pub/api/pub/meshconfig.js:988:19
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:473:16
at replenish (/usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:1009:25)
at iterateeCallback (/usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:998:17)
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:972:16
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:3891:9
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:473:16
at iteratorCallback (/usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:1067:13)
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:972:16
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:3888:13
at /usr/lib/perfsonar/psconfig-web-admin/pub/api/pub/meshconfig.js:544:9
at /usr/lib/perfsonar/psconfig-web-admin/pub/api/pub/meshconfig.js:338:13
at /usr/lib/perfsonar/psconfig-web-admin/pub/api/pub/meshconfig.js:324:21
at /usr/lib/perfsonar/psconfig-web-admin/shared/node_modules/async/dist/async.js:473:16
This isn't a problem if you add the host via the PsConfig Web Admin UI, although even the data returned from the API indicates that the hosts configurations are identical (less unique fields such as _id, hostname, sitename and update_date):
file: a.test = json data from the host added via API.
file: b.test = json data from the host added via GUI.
This bugfix covers corner cases when you add an Adhoc host via API then add the respective host to a host group, then mesh config.
The error encountered when loading mesh config:
This isn't a problem if you add the host via the PsConfig Web Admin UI, although even the data returned from the API indicates that the hosts configurations are identical (less unique fields such as
_id
,hostname
,sitename
andupdate_date
):file:
a.test
= json data from the host added via API. file:b.test
= json data from the host added via GUI.