Project

General

Profile

Actions

Bug #14247

closed

SMF seed databases contain build paths

Added by Andy Fiddaman 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
smf
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

The SMF seed databases that are built from gate end up containing the gate build path in their manifestfiles attribute. This ends up being supplemented with the correct path on first boot but causes an unnecessary service re-import on that first boot and persists in the database.

% svccfg -s network/initial listprop manifestfiles
manifestfiles                                                                                           framework
manifestfiles/data_omnios-build_omniosorg_bloody_illumos_usr_src_cmd_svc_milestone_network-initial_xml  astring  /data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/network-initial.xml
manifestfiles/lib_svc_manifest_network_network-initial_xml                                              astring  /lib/svc/manifest/network/network-initial.xml
$ svccfg -s network/initial listprop manifestfiles
manifestfiles                                                                                                                         framework
manifestfiles/jenkins_jobs_illumos-gate_workspace_components_openindiana__illumos-gate_usr_src_cmd_svc_milestone_network-initial_xml  astring  /jenkins/jobs/illumos-gate/workspace/components/openindiana/illumos-gate/illumos-gate/usr/src/cmd/svc/milestone/network-initial.xml
manifestfiles/lib_svc_manifest_network_network-initial_xml                                                                            astring  /lib/svc/manifest/network/network-initial.xml
Actions #1

Updated by Andy Fiddaman 6 months ago

Checking on gate as it is now:

% cd usr/src/cmd/svc/seed
% dmake
...
% /lib/svc/bin/sqlite common.db
sqlite> select value_value from value_tbl join prop_lnk_tbl on value_id = lnk_val_id join pg_tbl on pg_id = lnk_pg_id where pg_name = 'manifestfiles';
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/boot-archive.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/devices-local.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/devices-local.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/global.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/identity.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/local-fs.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/manifest-import.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/minimal-fs.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/multi-user.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/name-services.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/network-initial.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/network-loopback.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/network-netcfg.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/network-physical.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/restarter.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/root-fs.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/single-user.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/svc/milestone/usr-fs.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/dlmgmtd/dlmgmt.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/cmd-inet/lib/ipmgmtd/network-ipmgmt.xml
/data/omnios-build/omniosorg/bloody/illumos/usr/src/cmd/rpcbind/bind.xml
Actions #2

Updated by Andy Fiddaman 6 months ago

After the change in the associated Gerrit review:

sqlite> select value_value from value_tbl join prop_lnk_tbl on value_id = lnk_val_id join pg_tbl on pg_id = lnk_pg_id where pg_name = 'manifestfiles';
/lib/svc/manifest/milestone/multi-user.xml
/lib/svc/manifest/milestone/name-services.xml
/lib/svc/manifest/milestone/single-user.xml
/lib/svc/manifest/network/dlmgmt.xml
/lib/svc/manifest/network/network-initial.xml
/lib/svc/manifest/network/network-ipmgmt.xml
/lib/svc/manifest/network/network-loopback.xml
/lib/svc/manifest/network/network-netcfg.xml
/lib/svc/manifest/network/network-physical.xml
/lib/svc/manifest/network/rpc/bind.xml
/lib/svc/manifest/system/boot-archive.xml
/lib/svc/manifest/system/device/devices-local.xml
/lib/svc/manifest/system/device/devices-local.xml
/lib/svc/manifest/system/filesystem/local-fs.xml
/lib/svc/manifest/system/filesystem/minimal-fs.xml
/lib/svc/manifest/system/filesystem/root-fs.xml
/lib/svc/manifest/system/filesystem/usr-fs.xml
/lib/svc/manifest/system/identity.xml
/lib/svc/manifest/system/manifest-import.xml
/lib/svc/manifest/system/svc/global.xml
/lib/svc/manifest/system/svc/restarter.xml
Actions #3

Updated by Andy Fiddaman 6 months ago

I've also tested timing since I changed this to only start the temporary svc.configd process once for each batch of manifests and not once per manifest.

Before:

build:illumos:upstream_gate% hyperfine -w 1 -r 5 -i 'dmake all clobber'
Benchmark 1: dmake all clobber
  Time (mean ± σ):     33.465 s ±  2.090 s    [User: 12.508 s, System: 8.735 s]
  Range (min … max):   31.069 s … 35.748 s    5 runs

After:

build:illumos:ig_14247_smfseed% hyperfine -w 1 -r 5 -i 'dmake all clobber'
Benchmark 1: dmake all clobber
  Time (mean ± σ):     23.933 s ±  1.596 s    [User: 8.661 s, System: 6.655 s]
  Range (min … max):   22.376 s … 26.366 s    5 runs
Actions #4

Updated by Electric Monk 6 months ago

  • Gerrit CR set to 1809
Actions #5

Updated by Andy Fiddaman 6 months ago

I tested this by doing a full illumos-gate build on both OmniOS and OpenIndiana and by manually inspecting the generated seed databases.

I also applied the patch to OmniOS bloody, built new media and used that to deploy a new system and a new non-global zone (illumos branded), which use the seed databases in that process.

Actions #6

Updated by Electric Monk 6 months ago

  • Status changed from In Progress to Closed
  • % Done changed from 0 to 100

git commit f81209f5137586c57e31f7d74b929149299d9b3c

commit  f81209f5137586c57e31f7d74b929149299d9b3c
Author: Andy Fiddaman <omnios@citrus-it.co.uk>
Date:   2021-11-21T00:33:37.000Z

    14247 SMF seed databases contain build paths
    Reviewed by: Robert Mustacchi <rm+illumos@fingolfin.org>
    Reviewed by: Jason King <jason.brian.king+illumos@gmail.com>
    Reviewed by: Yuri Pankov <ypankov@tintri.com>
    Approved by: Dan McDonald <danmcd@joyent.com>

Actions

Also available in: Atom PDF