Closed oybed closed 8 years ago
@etsauer Please note that this PR works as-is. However, as discussed, after allocating a portion of the storage volume for logs, a system reboot should really take place. For now this can be a manual step as I presume the envs with separate /var/log partitions will be few - maybe just the d1/p1 envs for now. Again, all that's needed is a reboot (of all instances in the env) after the installation finishes.
@etsauer please let me know if you'd like to discuss this one further, or if you're OK with it as-is.
@oybed ran test... here are the results:
Created the following config:
[root@5b5d0e767b3a ~]# cat ./repository/rhc-ose/provisioning/log-part-test.cfg
## Platform Configs
#CONF_ENV_ID= # Default: random 8 character string
CONF_IMAGE_NAME=ose3-base # Default: ose3-base
CONF_OS_FLAVOR=m1.large # Default: m1.medium
CONF_SECURITY_GROUP_MASTER=ose3-master # Default: ose3-master
CONF_SECURITY_GROUP_NODE=ose3-node # Default: ose3-node
#CONF_LOGFILE=~/openstack_provision.log # Default: ~/openstack_provision.log
## OpenShift Configs
CONF_OPENSHIFT_BASE_DOMAIN=openshift.example.com # Default: ose.example.com
CONF_OPENSHIFT_CLOUDAPPS_SUBDOMAIN=cloudapps # Default: apps
CONF_PROVISION_COMPONENTS=openshift # Comman separated list. Supported values are: openshift,cicd. Default: openshift
CONF_OPENSHIFT_IDENTITY_PROVIDER=htpasswd_auth # Default: htpasswd_auth
#CONF_OPENSHIFT_MASTER_FILES= # Example value: /path/to/source:/path/to/dest /path/to/source2:/path/to/dest2; Default is null
#CONF_OPENSHIFT_NODE_FILES= # Example value: /path/to/source:/path/to/dest /path/to/source2:/path/to/dest2; Default is null
CONF_STORAGE_SIZE_LOGGING=5
Ran the following provisioning command
./repository/rhc-ose/provisioning/osc-provision --num-nodes=2 --config=./repository/rhc-ose/provisioning/log-part-test.cfg --key=esauer
Logged into the master and looked at the mounts:
[root@master ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg1-root 7.0G 1.5G 5.6G 21% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.6M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
/dev/mapper/vg--openshift-lv--ose 1.9G 33M 1.9G 2% /var/lib/openshift
/dev/mapper/vg1-lv_log 11G 40M 11G 1% /var/log
/dev/vda1 497M 230M 268M 47% /boot
tmpfs 3.9G 8.0K 3.9G 1% /var/lib/openshift/openshift.local.volumes/pods/f9c11de2-88a8-11e5-a655-fa163e67e52b/volumes/kubernetes.io~secret/router-token-gllu8
tmpfs 3.9G 8.0K 3.9G 1% /var/lib/openshift/openshift.local.volumes/pods/3aef16ee-88a9-11e5-ab72-fa163e67e52b/volumes/kubernetes.io~secret/volume-ie7wk
tmpfs 3.9G 8.0K 3.9G 1% /var/lib/openshift/openshift.local.volumes/pods/3aef16ee-88a9-11e5-ab72-fa163e67e52b/volumes/kubernetes.io~secret/registry-token-m6yyi
I can see the LV for logs, with /var/log mounted there... but the size shows as 11G, when the config file specifies a 5G partition.
@etsauer as mentioned, this needs to be built using the "new" version of the image, so please update the configuration file and point to one of the test images and re-try. I'll update the instructions above as well to note this.
@oybed ok, that looks better. Merging.
What does this PR do?
The tools now allow for a separate /var/log partition on the additional volume attached to the instances. If no configuration is passed, /var/log will stay as-is - i.e.: co-existing with the root file system in the partition used for /. If "CONF_STORAGE_SIZE_LOGGING" is set greater than 0, a partition of X GB will be allocated for logs.
How should this be manually tested?
NOTE: Make sure to run the tests on an image generated by the latest image creation process.
Is there a relevant Issue open for this?
67
Who would you like to review this?
/cc @etsauer