Issue Type: | Bug |
---|---|
Priority: | 4 - Normal |
Status: | Resolved |
Created at: | 2019-04-17T18:57:56.289Z |
Updated at: | 2019-05-02T20:42:48.245Z |
Created by: | Brian Bennett |
---|---|
Reported by: | Brian Bennett |
Assigned to: | Brian Bennett |
Fixed: A fix for this issue is checked into the tree and tested.
(Resolution Date: 2019-05-02T19:24:51.109Z)
2019-05-23 Spaceman (Release Date: 2019-05-23)
Changing scope on this because the package stuff never worked correctly. We're just going to rip it all out and this script will only update the root shadow. Additionally, the node.config will also be updated.
----
Old info
-
. I think this is left over from the SDC 6.5 days? At any rate, what needs to happen here is the billing_id
looked up rather than expecting package_name
, which isn't ever present.For deduplicating, I mock tested this change in a datacenter that has multiple redundant instances for several services (i.e., I just ran the curl command to produce the list of calls to add_pkg).
For the second problem I tested in coal and my test datacenter.
Before
[root@headnode (vt-coal-1) ~]# sdc-image-sync ; grep pkg /usbkey/config.inc/generic add '-' package for 'rabbitmq' to the generic config file add '-' package for 'amonredis' to the generic config file add '-' package for 'moray' to the generic config file add '-' package for 'manatee' to the generic config file add '-' package for 'vmapi' to the generic config file add '-' package for 'cnapi' to the generic config file add '-' package for 'sdc' to the generic config file add '-' package for 'ufds' to the generic config file add '-' package for 'binder' to the generic config file add '-' package for 'sapi' to the generic config file add '-' package for 'mahi' to the generic config file add '-' package for 'napi' to the generic config file add '-' package for 'papi' to the generic config file add '-' package for 'fwapi' to the generic config file add '-' package for 'imgapi' to the generic config file add '-' package for 'workflow' to the generic config file add '-' package for 'assets' to the generic config file add '-' package for 'amon' to the generic config file add '-' package for 'dhcpd' to the generic config file add '-' package for 'adminui' to the generic config file pkg_0=sdc_64:64:256:25600:100:1000:10:0ea54d9d-8d4d-4959-a87e-bf47c0f61a47 pkg_1=sdc_128:128:256:25600:100:1000:10:73a1ca34-1e30-48c7-8681-70314a9c67d3 pkg_2=sdc_256:256:512:25600:150:1000:10:78aa629d-04fc-4ee5-881b-0b4a914e0c52 pkg_3=sdc_512:512:1024:25600:200:1000:10:5dd022c8-5388-43e3-9fdd-536df4ea4f9f pkg_4=sdc_768:768:1536:25600:250:1000:10:1ee2a2ab-2138-8542-b563-a67bb03792f7 pkg_5=sdc_1024:1024:2048:25600:300:1000:10:4769a8f9-de51-4c1e-885f-c3920cc68137 pkg_6=sdc_2048:2048:4096:25600:400:1000:20:8d205d81-3672-4297-b80f-7822eb6c998b pkg_7=sdc_db:2048:4096:51200:400:1000:20:b2cd4ca7-ad7f-4a98-adeb-7adc9978a875 pkg_8=sdc_imgapi:768:1536:512000:250:1000:10:5dfe2cc2-cea2-0841-8e01-6cafbe5b7dbc pkg_9=sdc_4096:4096:8192:25600:400:1000:20:0ae33ebc-c216-11e2-9b84-6f7e2a82bc36 pkg_10=sdc_8192:8192:16384:25600:400:1000:20:16425b42-b818-11e2-90d4-87477f18a688 pkg_11=sdc_rabbitmq:2048:10240:25600:400:1000:20:dd16ed2f-e751-48f1-a5a4-571f93c8e65d assets_pkg=- sapi_pkg=- pkg_12= pkg_13= pkg_14= pkg_15= pkg_16= pkg_17= pkg_18= pkg_19= pkg_20= pkg_21= pkg_22= pkg_23= pkg_24= pkg_25= pkg_26= pkg_27= pkg_28= pkg_29= pkg_30= pkg_31= [root@headnode (vt-coal-1) ~]#
After
[root@headnode (vt-coal-1) ~]# /tmp/sdc-image-sync ; grep pkg /usbkey/config.inc/generic add 'sdc_2048' package for 'adminui' to the generic config file add 'sdc_1024' package for 'amon' to the generic config file add 'sdc_1024' package for 'amonredis' to the generic config file add 'sdc_128' package for 'assets' to the generic config file add 'sdc_256' package for 'binder' to the generic config file add 'sdc_1024' package for 'cloudapi' to the generic config file add 'sdc_1024' package for 'cmon' to the generic config file add 'sdc_1024' package for 'cnapi' to the generic config file add 'sdc_1024' package for 'cns' to the generic config file add 'sdc_256' package for 'dhcpd' to the generic config file add 'sdc_4096' package for 'docker' to the generic config file add 'sdc_1024' package for 'fwapi' to the generic config file add 'sdc_imgapi' package for 'imgapi' to the generic config file add 'sdc_1024' package for 'mahi' to the generic config file add 'sdc_db' package for 'manatee' to the generic config file add 'sdc_8192' package for 'moray' to the generic config file add 'sdc_256' package for 'napi' to the generic config file add 'sdc_1024' package for 'papi' to the generic config file add 'sdc_768' package for 'portolan' to the generic config file add 'sdc_rabbitmq' package for 'rabbitmq' to the generic config file add 'sdc_1024' package for 'redis' to the generic config file add 'sdc_512' package for 'sapi' to the generic config file add 'sdc_1024' package for 'sdc' to the generic config file add 'sdc_8192' package for 'ufds' to the generic config file add 'sdc_1024' package for 'vmapi' to the generic config file add 'sdc_1024' package for 'volapi' to the generic config file add 'sdc_8192' package for 'workflow' to the generic config file pkg_0=sdc_64:64:256:25600:100:1000:10:0ea54d9d-8d4d-4959-a87e-bf47c0f61a47 pkg_1=sdc_128:128:256:25600:100:1000:10:73a1ca34-1e30-48c7-8681-70314a9c67d3 pkg_2=sdc_256:256:512:25600:150:1000:10:78aa629d-04fc-4ee5-881b-0b4a914e0c52 pkg_3=sdc_512:512:1024:25600:200:1000:10:5dd022c8-5388-43e3-9fdd-536df4ea4f9f pkg_4=sdc_768:768:1536:25600:250:1000:10:1ee2a2ab-2138-8542-b563-a67bb03792f7 pkg_5=sdc_1024:1024:2048:25600:300:1000:10:4769a8f9-de51-4c1e-885f-c3920cc68137 pkg_6=sdc_2048:2048:4096:25600:400:1000:20:8d205d81-3672-4297-b80f-7822eb6c998b pkg_7=sdc_db:2048:4096:51200:400:1000:20:b2cd4ca7-ad7f-4a98-adeb-7adc9978a875 pkg_8=sdc_imgapi:768:1536:512000:250:1000:10:5dfe2cc2-cea2-0841-8e01-6cafbe5b7dbc pkg_9=sdc_4096:4096:8192:25600:400:1000:20:0ae33ebc-c216-11e2-9b84-6f7e2a82bc36 pkg_10=sdc_8192:8192:16384:25600:400:1000:20:16425b42-b818-11e2-90d4-87477f18a688 pkg_11=sdc_rabbitmq:2048:10240:25600:400:1000:20:dd16ed2f-e751-48f1-a5a4-571f93c8e65d assets_pkg=sdc_128 sapi_pkg=sdc_512
I cleaned out the spurious empty "sdc_XX=
" lines before running the fixed one.
Note that the reason only assets_pkg and sapi_pkg are there is because sdc-image-sync
only adds the service package if it already exists in the file.
New test info after ripping out all of the package stuff:
[root@headnode (barovia) /var/tmp/bbennett]# passwd passwd: Changing password for root New Password: Re-enter new Password: passwd: password successfully changed for root [root@headnode (barovia) /var/tmp/bbennett]# ./sdc-image-sync Updating root password in the config file [root@headnode (barovia) /var/tmp/bbennett]# grep -h root_shadow /usbkey/config /usbkey/extra/joysetup/node.config ; grep root /etc/shadow root_shadow='$5$XqKK9873$4wjQC9THv75Vu9dCeJb5tZgaBfYoi4hn3qSbXX0nHF5' root_shadow='$5$XqKK9873$4wjQC9THv75Vu9dCeJb5tZgaBfYoi4hn3qSbXX0nHF5' root:$5$XqKK9873$4wjQC9THv75Vu9dCeJb5tZgaBfYoi4hn3qSbXX0nHF5:18018::::::
sdc-headnode commit 9aa16b9af114c9739fd6981bb964bd0bacff12b3 (branch master, by Brian Bennett)
TRITON-1415 sdc-image-sync doesn't add packages correctly and should stop trying
documentation commit 73cd19f82a794b696b209f07686ddc0ccb3d2416 (branch master, by Brian Bennett)
documentation#1224 Update headnode password documentation with improvements from TRITON-1415