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

PMM-11226 OLM Known issues #1835

Merged
merged 16 commits into from
Mar 16, 2023
Merged
Changes from 6 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
113 changes: 113 additions & 0 deletions docs/dbaas/olm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,113 @@
---
slug: 'dbaas'
---

## How OLM (Operator Lifecycle Manager) works.

DBaaS leverages the installation and upgrade of operators on OLM.
To install an operator, we need to create an operator group and a subscription.
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
The official documentation with detailed examples can be found [here](https://olm.operatorframework.io/docs/tasks/install-operator-with-olm/).

DBaaS installs several operators by default:
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
- OLM
- DBaaS
- PSMDB
- PXC

You can manually list the subscriptions using kubectl:
```
kubectl get subscriptions
NAME PACKAGE SOURCE CHANNEL
my-percona-server-mongodb-operator percona-server-mongodb-operator operatorhubio-catalog stable
my-percona-xtradb-cluster-operator percona-xtradb-cluster-operator operatorhubio-catalog stable
```

### Known issue.
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
If you have 2 or more operators pending for installation approval, the second subscription OLM creates
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
will have both operators. Listing the install plans could be confusing. For example:
```
kubectl get installplans
NAME CSV APPROVAL APPROVED
install-9rxvz percona-server-mongodb-operator.v1.13.1 Manual false
install-mghbh percona-server-mongodb-operator.v1.13.1 Manual false
```
It seems like both install plans are for PSMDB but examining the install plans individually can shed some light on the matter:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this sentence is required.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, it is necessary. It describes the actual issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@rasika-chivate can we keep this or can you help me to rephrase it?
In my opinion it is necessary because it describes the root cause of the problem.

Copy link
Contributor

@rasika-chivate rasika-chivate Mar 16, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we rephrase to "Although both install plans seem to be for PSMDB, it's worth examining each separately:"

First install plan:
rasika-chivate marked this conversation as resolved.
Show resolved Hide resolved

```
kubectl get installplan install-9rxvz -oyaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
creationTimestamp: "2023-03-07T12:36:28Z"
generateName: install-
generation: 1
labels:
operators.coreos.com/percona-server-mongodb-operator.default: ""
name: install-9rxvz
namespace: default
ownerReferences:
- apiVersion: operators.coreos.com/v1alpha1
blockOwnerDeletion: false
controller: false
kind: Subscription
name: my-percona-server-mongodb-operator
uid: 2581b852-36b3-41e3-92f0-02a4f2ebb05d
resourceVersion: "1037"
uid: d02807a7-3b24-49eb-b12b-63bc1ef817d6
spec:
approval: Manual
approved: false
clusterServiceVersionNames:
- percona-server-mongodb-operator.v1.13.1
generation: 1
```

Second install plan:
```
kubectl get installplan install-mghbh -oyaml
apiVersion: operators.coreos.com/v1alpha1
kind: InstallPlan
metadata:
creationTimestamp: "2023-03-07T12:41:46Z"
generateName: install-
generation: 1
labels:
operators.coreos.com/percona-xtradb-cluster-operator.default: ""
name: install-mghbh
namespace: default
ownerReferences:
- apiVersion: operators.coreos.com/v1alpha1
blockOwnerDeletion: false
controller: false
kind: Subscription
name: my-percona-server-mongodb-operator
uid: 2581b852-36b3-41e3-92f0-02a4f2ebb05d
- apiVersion: operators.coreos.com/v1alpha1
blockOwnerDeletion: false
controller: false
kind: Subscription
name: my-percona-xtradb-cluster-operator
uid: 6796d009-9a29-49b4-af9b-6af09a895317
resourceVersion: "1314"
uid: f6a87327-1f60-4cae-8b7a-d881c8c522c2
spec:
approval: Manual
approved: false
clusterServiceVersionNames:
- percona-server-mongodb-operator.v1.13.1
- percona-xtradb-cluster-operator.v1.12.0
generation: 2
```
The second install plan shows in the spec section it will handle the installation of both operators:
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
```
spec:
approval: Manual
approved: false
clusterServiceVersionNames:
- percona-server-mongodb-operator.v1.13.1
- percona-xtradb-cluster-operator.v1.12.0
```
So, only when getting the install plan details in yaml or json format we can see which operators are being handled by the install plan.
percona-csalguero marked this conversation as resolved.
Show resolved Hide resolved
The short version `kubectl get installplans` will show only the first operator in the list and this can be confusing and misleading.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this as a note?