13 Commits

Author SHA1 Message Date
Lingxian Kong
1e4405c60b Fix trove guest agent logrotate
* The logrotate file owner should be root
* Log file path is /var/log/trove/trove-guestagent.log

Change-Id: I669fedc76aa79d7bfc1e4e64684adc4a89a3a15d
2021-09-30 22:27:53 +13:00
Lingxian Kong
4ce59ace17 Add package iptables-persistent inside guest instance
iptables-persistent is needed to persists the iptable settings inside
guest instance.

Change-Id: I96bb9f948dda22f50ec2a4fb5710ad9778e16b9d
2021-07-09 11:27:40 +12:00
Lingxian Kong
b050996b9f Use bridge network for db container
- Changed the network mode of database container to "bridge" and exposed
  the service ports.
- Use socket file to connect with the database.
- Upgrade the backup container image for postgressql.

Change-Id: Id5b119f8a474befc3a2cd6e061bbffc4ae5f7bb6
2021-06-22 19:10:14 +12:00
Lingxian Kong
1e04b269ca Stop using pip-and-virtualenv diskimage element
ALthough diskimage-builder will solve the issue eventually, but we
still prefer to put the package installation under trove's own control.

Story: 2008559
Task: 41697

Change-Id: Ie704db8233c4b797eeefa140c4a11427280dffd9
2021-01-27 11:43:16 +13:00
Lingxian Kong
a97ff84c19 Improve trove guest image build script
Also using ubuntu-minimal to decrease the image size a little bit, from 963M
to 815M in the test.

Change-Id: I6d70add380f4b61ebe89c72765612d8cb6127ccb
2020-11-26 14:17:57 +13:00
Lingxian Kong
aa1d4d2246 Datastore containerization
Significant changes:

* Using docker image to install datastore.
* Datastore image is common to different datastores.
* Using backup docker image to do backup and restore.
* Support MariaDB replication
* Set most of the functional jobs as non-voting as nested
  virtualization is not supported in CI.

Change-Id: Ia9c97a63a961eebc336b70d28dc77638144c1834
2020-05-27 10:31:50 +12:00
Lingxian Kong
523d66e8fd Fix CI job
* Fix pep8: ambiguous variable name
* Install Python 3.7 for trove guest image. oslo.concurrency requires
  python 3.6 or newer. See
  https://bugs.launchpad.net/tripleo/+bug/1861803
* Mark tempest job non-voting temporarily because of some tempest bugs.

Change-Id: I6d316779cc7220a855ce187437056b667bbe1f75
2020-05-25 17:37:38 +12:00
Nguyen Van Trung
1d314fdf91 Support pip3-virtualenv during image creation
This patch will auto-process with `pip-and-virtualenv`
element when use `guest-agent` in python3. We also can add
this element in disk-image-create cli which instead of
this patch to fix following issue:

   2019-09-12 09:19:58.674 | + python3 -m virtualenv /opt/guest-agent-venv
   2019-09-12 09:19:58.752 | /usr/bin/python3: No module named virtualenv

Change-Id: I21090320ba7396979cee31431de7198150dd763e
2019-12-05 09:34:52 +00:00
Lingxian Kong
d244c9d666 Support to specify branch when building the image
- Explicity specify branch name for building non-dev image
- Use branch name for building dev image in devstack
- Update the doc

Candidate backport for stable/train

Change-Id: I4d2fe38fac34c75b42234fa7a20aba51e6dc1c4e
2019-10-10 21:55:53 +13:00
Lingxian Kong
c23c1b9d0c Improve image build
- Remove network-scripts package from guest agent, otherwise image
  creation will fail with network-scripts not found.
- Improve the way to install percona-xtrabackup package on Xenial to
  avoid the failure: "write error: No space left on device"

Change-Id: I6d8de1ad0f675db9635f4762cefc26169e738bbc
2019-09-02 22:58:28 +12:00
Lingxian Kong
dfa5ce93d5 Improve devmode=flase when building the image
During debugging, the following changes are also included:

- Support to specify an image ID to run the integration test.
- Fix the reboot function bug.
- Remove the unsuccessful restart test.

How to run integration test with dev_mode=false:

    ADMIN_PASSWORD=password \
    SERVICE_PASSWORD=password \
    DEV_MODE=false \
    /opt/stack/trove/integration/scripts/trovestack gate-tests mysql mysql

Change-Id: I31d4ee579a554f4c98f9facb9fd4b7779665a3dd
2019-08-25 23:11:54 +12:00
Lingxian Kong
eafd303e0a Use opendev.org instead of git.openstack.org
After moving to opendev.org, the following command fails when building
the Trove guest image:

curl -o /opt/stack/devstack/upper-constraints.txt \
  'https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt?h=master'

https://opendev.org/openstack/requirements/raw/branch/master/upper-constraints.txt
should be used instead.

Other places using git.openstack.org are also changed.

Change-Id: Id357dd61e229e3336219723c1c1ae6b50e983f26
2019-04-22 00:05:41 +12:00
Lingxian Kong
798af4d02a Improve trove guest agent image building
- Add a new element 'guest-agent' for image building. This element is
  used when dev_mode=false, so that the trove code is downloaded into
  the image during the building phase rather than during the guest
  agent initialization.
- Improve trovestack sub-command 'build-image'.

  ./trovestack build-image ${datastore_type} \
     ${guest_os} \
     ${guest_release} \
     ${dev_mode}

- Improve documentation.

Story: #2005387
Task: #30375

Change-Id: I9d7acbd6a97f8c01b48b0f2cf94398d549d89124
2019-04-10 09:29:40 +12:00