Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 1.4 backports #3048

Merged
merged 3 commits into from
Jan 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 21 additions & 8 deletions playbooks/common/openshift-cluster/upgrades/etcd/backup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,28 @@
{{ avail_disk.stdout }} Kb available.
when: (embedded_etcd | bool) and (etcd_disk_usage.stdout|int > avail_disk.stdout|int)

# TODO - Refactor containerized backup to use etcd_container to backup the data so we don't rely on
# the host's etcdctl binary which may be of a different version.

# for non containerized and non embedded we should have the correct version of etcd installed already
# For embedded we need to use the latest because OCP 3.3 uses a version of etcd that can only be backed
# up with etcd-3.x
# For non containerized and non embedded we should have the correct version of
# etcd installed already. So don't do anything.
#
# For embedded or containerized we need to use the latest because OCP 3.3 uses
# a version of etcd that can only be backed up with etcd-3.x and if it's
# containerized then etcd version may be newer than that on the host so
# upgrade it.
#
# On atomic we have neither yum nor dnf so ansible throws a hard to debug error
# if you use package there, like this: "Could not find a module for unknown."
# see https://bugzilla.redhat.com/show_bug.cgi?id=1408668
#
# TODO - We should refactor all containerized backups to use the containerized
# version of etcd to perform the backup rather than relying on the host's
# binaries. Until we do that we'll continue to have problems backing up etcd
# when atomic host has an older version than the version that's running in the
# container whether that's embedded or not
- name: Install latest etcd for containerized or embedded
package: name=etcd state=latest
when: ( openshift.common.is_containerized and not openshift.common.is_atomic ) or embedded_etcd | bool
package:
name: etcd
state: latest
when: ( embedded_etcd | bool or openshift.common.is_containerized ) and not openshift.common.is_atomic

- name: Generate etcd backup
command: >
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: cloudforms
spec:
capacity:
storage: 2Gi
accessModes:
- ReadWriteOnce
nfs:
path: /opt/nfs/volumes-app
server: 10.19.0.216
persistentVolumeReclaimPolicy: Recycle
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: v1
kind: PersistentVolume
metadata:
name: nfs-pv01
spec:
capacity:
storage: 2Gi
accessModes:
- ReadWriteOnce
nfs:
path: /opt/nfs/volumes
server: 10.19.0.216
persistentVolumeReclaimPolicy: Recycle
Loading