Skip to content

Commit

Permalink
upstream-ecs-3.2.0.0 (#418)
Browse files Browse the repository at this point in the history
* add previous buildscript for troubleshooting

Took 35 minutes

* re-add memory constraint scripts to patch_script

Took 37 seconds

* set container to run in privileged mode same as appliance container

Took 52 minutes

* wrong firewalld service name

Took 49 seconds

* bump upstream version for conditional blkid

Took 28 minutes

* make blkid switch between UUID and PARTUUID based on upstream version

Took 1 minute

* resolve issues getting 3.2.0.0 to boot up

Took 1 hour 18 minutes

* revert to terraform 1.3

Took 9 minutes
  • Loading branch information
padthaitofuhot committed Apr 25, 2018
1 parent e7320f2 commit 45a1e93
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 11 deletions.
30 changes: 30 additions & 0 deletions patches/3.2.0.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Fixes to the default 3.2.0.0 reduced image.

# Build on object-reduced image (GA release)
FROM emcvipr/object:3.2.0.0-101423.d3b297f-reduced

# Increase memory for transformsvc
RUN sed -i s/Xmx128m/Xmx512m/ /opt/storageos/bin/transformsvc

# Set memory for objcontrolsvc
RUN sed -i s/Xmx96m/Xmx256m/ /opt/storageos/bin/objcontrolsvc

# Fix disk partitioning script
RUN sed -i '/VMware/ s/$/ \&\& [ ! -e \/data\/is_community_edition ]/' /opt/storageos/bin/storageserver-partition-config.sh

RUN /usr/bin/chmod +x /opt/storageos/bin/storageserver-partition-config.sh

# Set VNest useSeperateThreadPools to True
RUN f=/opt/storageos/conf/vnest-common-conf.xml; grep -q "object.UseSeparateThreadPools" $f || sed -i '/properties id="serviceProperties"/a \ \ \ \ \ \ \ \ <prop key="object.UseSeparateThreadPools">true</prop>' $f

# Set georeceiver's initialBufferNumOnHeap to something smaller for CE
RUN f=/opt/storageos/conf/georeceiver-conf.xml; grep -q 'name="initialBufferNumOnHeap" value="5"' $f || sed -i 's/name="initialBufferNumOnHeap" value="60"/name="initialBufferNumOnHeap" value="5"/' $f

RUN f=/opt/storageos/conf/georeceiver-conf.xml; grep -q '<prop key="object.InitialBufferNumOnHeap">10</prop>' $f || sed -i 's#<prop key="object.InitialBufferNumOnHeap">80</prop>#<prop key="object.InitialBufferNumOnHeap">10</prop>#g' $f

# Configure CM Object properties: Disable minimum storage device count
RUN f=/opt/storageos/conf/cm.object.properties; grep -q 'MustHaveEnoughResources=false' $f || sed -i 's/MustHaveEnoughResources=true/MustHaveEnoughResources=false/' $f

# Allow allocation of different blocks of a chunk to be stored on the same partition
RUN f=/opt/storageos/conf/ssm-cf-conf.xml; grep -q '<config:boolean name="allowAllocationOnIgnoredPartitions" value="true" description="If set to true, different blocks in one chunk may be allocated on the same partition"/>' $f || sed -i 's#<config:boolean name="allowAllocationOnIgnoredPartitions" value="false" description="If set to true, different blocks in one chunk may be allocated on the same partition"/>#<config:boolean name="allowAllocationOnIgnoredPartitions" value="true" description="If set to true, different blocks in one chunk may be allocated on the same partition"/>#g' /opt/storageos/conf/ssm-cf-conf.xml $f

5 changes: 5 additions & 0 deletions patches/3.2.0.0/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash
IMAGE_REPO="emccorp/ecs-software-3.2.0"
IMAGE_VERSION="3.2.0.0"

docker build -t "${IMAGE_REPO}:${IMAGE_VERSION}" .
2 changes: 1 addition & 1 deletion patches/libexec/patch_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ declare COREOS_IOUTIL_HEAP_CACHE_SIZE=${COREOS_IOUTIL_HEAP_CACHE_SIZE:-209715200
declare COREOS_NUM_DT_PER_COS=${COREOS_NUM_DT_PER_COS:-6}

grep -hoE 'Xmx[0-9]+m' /opt/storageos/bin/* | grep -oE '[0-9]+'| sort -n | uniq | while read m; do
if [ "$m" -gt 128 ]; then
if [ "$m" -gt 256 ]; then
REDUCED_MEMORY="$(( m / $COREOS_MULTI_JVM_MEMORY_DIV))"
find /opt/storageos/bin -type f -print | while read f; do
if file "$f" | grep -q 'shell script'; then
Expand Down
1 change: 1 addition & 0 deletions tests/lab.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
provider "vsphere" {
version = "~> 1.3.0"
user = "${var.vsphere_user}"
password = "${var.vsphere_password}"
vsphere_server = "${var.vsphere_server}"
Expand Down
7 changes: 7 additions & 0 deletions ui/ansible/roles/common_baseline_install/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@
shell: blkid -s UUID -o value {{item}}1
with_items: "{{ecs_block_devices}}"
register: uuid
when: product_version | version_compare('3.2', '<')

- name: Common | Gather block device partition UUIDs
shell: blkid -s PARTUUID -o value {{item}}1
with_items: "{{ecs_block_devices}}"
register: uuid
when: product_version | version_compare('3.2', '>=')

- name: Common | Make mountpoints for ECS block devices
file: path="/ecs/uuid-{{ item.stdout }}" state=directory recurse=yes owner=444 group=444
Expand Down
1 change: 1 addition & 0 deletions ui/ansible/roles/common_deploy/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,5 @@
restart_policy: no
stop_timeout: 300
state: present
privileged: yes

10 changes: 10 additions & 0 deletions ui/ansible/roles/common_purge_cleanup/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@
register: uuid
ignore_errors: true
failed_when: false
when: product_version | version_compare('3.2', '<')
tags: disks

- name: Common | Gather block device partition UUIDs
shell: blkid -s PARTUUID -o value {{item}}1
with_items: "{{ecs_block_devices}}"
register: uuid
ignore_errors: true
failed_when: false
when: product_version | version_compare('3.2', '>=')
tags: disks

- name: Common | Unmount partitions
Expand Down
4 changes: 2 additions & 2 deletions ui/etc/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
---
ui:
name: ECS Community Edition Install Node
version: 2.6.1
version: 2.7.1
host_root_dir: /opt/emc/ecs-install
state_file: /opt/state.yml
deploy_file: /opt/deploy.yml
Expand All @@ -32,7 +32,7 @@ ui:
ffx_sem: /opt/ffx.sem
product:
name: ECS
version: 3.1.0.3
version: 3.2.0.0
vendor: Dell EMC
flavor: Community Edition
slogan: Free and Frictionless
Expand Down
12 changes: 6 additions & 6 deletions ui/etc/release.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
# it is provided by or on behalf of EMC.

release_name="ECS Community Edition"
release_version="3.1.0.3"
release_version="3.2.0.0"
release_product="ECS Software"
release_artifact="emccorp/ecs-software-3.1.0"
release_tag="3.1.0.3"
release_artifact="emccorp/ecs-software-3.2.0"
release_tag="3.2.0.0"
release_common_name="emccorp/ecs-software:latest"

docker_host_root="/opt/emc/ecs-install"
Expand All @@ -32,9 +32,9 @@ repo_name='emccorp'
image_name='ecs-install'
tag='latest'
ver_maj='2'
ver_min='6'
ver_rev='1'
ver_tag='r'
ver_min='7'
ver_rev='0'
ver_tag='a'
serial=0

# TODO: Fill in ecsdeploy_ vars with production values!
Expand Down
2 changes: 1 addition & 1 deletion ui/resources/docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ if ! [ -z "$*" ]; then
/bin/ash -l
else
ansible_user="$(grep '^ *ssh_username:' /opt/deploy.yml | awk '{print $2}')"
/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /opt/ssh/id_ed25519 "${ansible_user}"@"${2}"
/usr/bin/ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -i /opt/ssh/id_rsa -i /opt/ssh/id_ed25519 "${ansible_user}"@"${2}"
fi
cond_incr_rc $?
;;
Expand Down
2 changes: 1 addition & 1 deletion ui/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setup(
name='ecsdeploy',
version='2.6.1',
version='2.7.0',
packages=find_packages(),
scripts=['ui.py',
'ecsdeploy.py',
Expand Down

0 comments on commit 45a1e93

Please sign in to comment.