Commit Graph

6 Commits

Author SHA1 Message Date
Scott Little 3ce6152837 Switch build avoidance from cgcs-tis-repo to local-repo
Story: 2006387
Task: 36910
Depends-On: https://review.opendev.org/#/c/687401
Change-Id: Ifc1b2df8bc875212e7e850a334845796c6a30c53
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-10-14 10:28:23 -04:00
Shuicheng Lin 7a5616741a Fix rt kernel always rebuild issue
Several rt kernel rpms are disabled in spec, add them to
unbuilt_rpm_patterns. Otherwise rebuild will be triggered
due to missing of these rpms.

Story: 2007308
Task: 39618

Change-Id: I06a56dd9d18f6873e316fbaaff752c70a33f14fd
Signed-off-by: Shuicheng Lin <shuicheng.lin@intel.com>
2020-05-02 22:46:03 +08:00
Scott Little 9b77e2e1b3 Build avoidance fixes
1) Build avoidance fails on a clean workspace because directory
$MY_WORKSPACE/tmp doesn't exist when mktemp needs to
create a forth subdir under that path.

Add a 'mkdir -p $MY_WORKSPACE/tmp' to ensure it exists
prior to mktemp.

2) Failed to rebuild kmods after a kernel change and
building with build-avoidance enabled.  The problem was
a missing dependency cache that would have listed
the kmods as having dependencies on the kernel.
Reusing kmods from a prior build in conjunction with
a rebuilt kernel results int load with unusable kmods
due to a key mismatch.

Add the dependancy-cache to the list of artifacts to
syncronize as part of build avoidance.  A primed
dependency cache will allow build-pkgs to determine
that kmods must be rebuilt when the kernel has changed.

3) Make sure $MY_WORKSPACE/$BUILD_TYPE/repo
symlink exists after a build avoidance build.
If no packages require a rebuild, it was missing.

4) Fix an error message that was puzzling while debugging
the above issues.

Closes-Bug: 1864110
Change-Id: Ia912b2e3e110efbe69004d7978109ebb089d684b
Signed-off-by: Scott Little <scott.little@windriver.com>
2020-02-21 16:07:05 -05:00
Kristine Bujold b75a32071d Remove wrs-guest-scale SDK Module
With the StarlingX move to supporting pure upstream OpenStack, the
majority of the SDK Modules are related to functionality no longer
supported. The remaining SDK Modules will be moved to StarlingX
documentation.

Story: 2005275
Task: 30138
Depends-On: https://review.openstack.org/#/c/647561

Change-Id: I7f4ddd4fa33d2b19d9fd5f10b185700c1e8bc5d1
Signed-off-by: Kristine Bujold <kristine.bujold@windriver.com>
2019-03-25 13:48:27 -04:00
Scott Little b20ac0164d Build Avoidance
Purpose:
   Reduce build times after a repo sync by pulling in pre-generated
srpms and rpms and other build products created by a local reference build.

Usage:
  repo sync
  generate-cgcs-centos-repo.sh ...
  populate_downloads.sh ...
  build-pkgs --build-avoidance [--build-avoidance-user <user> \
     --build-avoidance-host <addr> --build-avoidance-dir <dir>]

Reference builds:
- A server performs a regular (daily?), automated builds using
  existing methods. Call these the reference builds.

- The builds are timestamped, and preserved for some time. (weeks?)
  The MY_WORKSPACE directory for the build shall have a common root
  directory, and a leaf directory that is a UTC time stamp of format
  YYYYMMDDThhmmssZ.
  e.g.
  MY_WORKSPACE=/localdisk/loadbuild/jenkins/StarlingX/20180719T113021Z

  Alternative formats are possible by setting values in ...
  "$MY_REPO/local-build-data/build_avoidance_source"
  e.g.
  BUILD_AVOIDANCE_DATE_FORMAT="%Y-%m-%d"
  BUILD_AVOIDANCE_TIME_FORMAT="%H-%M-%S"
  BUILD_AVOIDANCE_DATE_TIME_DELIM="_"
  BUILD_AVOIDANCE_DATE_TIME_POSTFIX=""
  BUILD_AVOIDANCE_DATE_UTC=0

  Which results in YYYY-MM-DD_hh-mm-ss format using local time.
  The one property that the timestamp must have is that they
  are sortable, and that the reference build and the consumer of
  the reference builds agree on the format.

- A build CONTEXT is captured, consisting of the SHA of each and every
  git that contributed to the build.

- For each package built, a file shall capture he md5sums of all the
  source code inputs to the build of that package.

- All these build products are accessible locally (e.g. a regional
  office) via rsync (other protocols can be added later).  ssh
  is also required to run remote query commands on the reference build.

  Initial ground work to support a selection variable ....
  BUILD_AVOIDANCE_FILE_TRANSFER="my-transfer-protocol"
  in $MY_REPO/local-build-data/build_avoidance_source"
  has been created, but "rsync" is the only valid value at this time.

- Location of the reference build can be specified via command line, or
  defaults can be put in $MY_REPO/local-build-data/build_avoidance_source.
  The local-build-data directory is gitignored by stx-root and so can be
  customized for local needs.
  e.g.
  cat $MY_REPO/local-build-data/build_avoidance_source
  BUILD_AVOIDANCE_USR="jenkins"
  BUILD_AVOIDANCE_HOST="stx-build-server.myco.com"
  BUILD_AVOIDANCE_DIR="/localdisk/loadbuild/jenkins/StarlingX"

Notes:
- Build avoidance is only used if requested.
- Build avoidance does not necessarily use the latest reference build.
  It compares the git context of all available reference builds vs your
  own git context, and chooses the most recent for which you gits have
  all the conent.  i.e. all your gits will be same or newer than that
  used by the reference build.  This also meens that some packages might
  still need to be rebuilt after the download step.
- Normally build avoidance remembers the last download context and will only
  consider reference builds newer than the last download.   You can reset
  using 'build-pkgs --build-avoidance --clear' to erase the download history.
  When might this matter to me?  If you change to an old branch that
  hasn't been synced recently and want to build in that context.
- The primary assumtion of Build Avoidance is that it is faster to
  download packages than to build them.  This is typically true of a
  good LAN, but likely not true of a WAN. This is why we emphasize the
  local nature of your reference build server.

Also in this update:
- reworked context generation to be relative to 'dirname $MY_REPO'
- Moved md5sum calculation to a common file, and fixed case where
  symlinks where canonacalized to paths outside of $MY_REPO.
  We'll make an exception to canonacalization to keep paths
  relative to $MY_REPO.
- In future other functions could be moved to the common file.

Story: 2002835
Task: 22754
Change-Id: I757780190cc6063d0a2d3ad9d0a6020ab5169e99
Signed-off-by: Scott Little <scott.little@windriver.com>
2018-09-17 16:41:31 -04:00
Dean Troyer cfe45dadae StarlingX open source release updates
Signed-off-by: Dean Troyer <dtroyer@gmail.com>
2018-06-01 07:45:23 -07:00