Project

General

Profile

Actions

Bug #5971

closed

svccfg needs to treat users of SVCCFG_REPOSITORY like a native build

Added by Toomas Soome over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
smf
Start date:
2015-05-30
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

I was attempting to build iso with distro constructor from onu+hipster repo and the build is stuck: ==== ba-config: Boot archive configuration
exec command: /usr/share/distro_const/boot_archive_configure /tmp/ManifestServ.4019 /rpool/dc/build_data/pkg_image /rpool/dc/build_data/tmp /rpool/dc/build_data/boot_archive /rpool/dc/media .textinstall

Configuring boot archive...
Preloading SMF repository...

investigating the issue, it appears indeed, svccfg import is never able to finish, also repeatable by starting import manually:
LD_LIBRARY_PATH=/rpool/dc/build_data/pkg_image/lib:/rpool/dc/build_data/pkg_image/usr/lib: SVCCFG_DTD=/rpool/dc/build_data/boot_archive/usr/share/lib/xml/dtd/service_bundle.dtd.1 SVCCFG_REPOSITORY=/rpool/dc/build_data/boot_archive/etc/svc/repository.db dtrace -n 'pid$target::lscf_bundle_import:entry {printf("lscf_bundle_import: %s\n", copyinstr(arg1));}' -c "/code/tsoome/illumos-gate/usr/src/cmd/svc/svccfg/svccfg import /rpool/dc/build_data/boot_archive/lib/svc/manifest/application"
dtrace: description 'pid$target::lscf_bundle_import:entry ' matched 1 probe
CPU ID FUNCTION:NAME
1 7340 lscf_bundle_import:entry lscf_bundle_import: /rpool/dc/build_data/boot_archive/lib/svc/manifest/application/texinfo-update.xml

so the svccfg is not getting even single manifest imported.

testing svc.configd with: dtrace -n 'pid$target::strcmp:entry {printf("%s %s\n", copyinstr(arg0), copyinstr(arg1));ustack();}' -p 5407 and it appears to be looping on:

0  77411                     strcmp:entry general restarter
libc.so.1`strcmp
svc.configd`rc_node_find_named_child+0x99
svc.configd`rc_node_get_child+0x5d
svc.configd`entity_get_child+0x4b
svc.configd`simple_handler+0x55
svc.configd`client_switcher+0x1df
libc.so.1`__door_return+0x3d

apparently its not able to find "restarter" property. I'd guess either the https://www.illumos.org/issues/5896 does not resolve all cases or introduced regression, as distro_const was working before, I'd rather suspect regression.

Actions #1

Updated by Robert Mustacchi over 6 years ago

  • Subject changed from disto_const is stuck on "Preloading SMF repository" and therefore is not usable. to svccfg needs to treat users of SVCCFG_REPOSITORY like a native build
  • Assignee set to Robert Mustacchi
  • % Done changed from 0 to 80
  • Difficulty changed from Medium to Bite-size
  • Tags deleted (needs-triage)

There are many tools in the form of distro tools that use undocumented or cross-consolidation private interfaces to svccfg to manipulate seed repositories. Unfortunately, the general world of svccfg and configd assumes that there's a startd and when there isn't, it instead uses the native build to accomplish this. However, these tools aren't using the native build and therefore we need to extend the recent changes in 5896 to work around this case. What we'll do is hook on the presence of the private SVCCFG_REPOSITORY environment variable. This indicates to us that we'll be launching a different configd which will thus not have a corresponding startd.

Actions #2

Updated by Robert Mustacchi over 6 years ago

  • Status changed from New to Pending RTI
  • % Done changed from 80 to 100
Actions #3

Updated by Electric Monk over 6 years ago

  • Status changed from Pending RTI to Closed

git commit 8370701b9b48afe365394c34cab9a75f018594aa

commit  8370701b9b48afe365394c34cab9a75f018594aa
Author: Robert Mustacchi <rm@joyent.com>
Date:   2015-06-03T14:29:40.000Z

    5971 svccfg needs to treat users of SVCCFG_REPOSITORY like a native build
    Reviewed by: Toomas Soome <tsoome@me.com>
    Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
    Approved by: Dan McDonald <danmcd@omniti.com>

Actions

Also available in: Atom PDF