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

ci: detect poller logs errors #2609

Merged
merged 1 commit into from
Jan 29, 2024
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
51 changes: 43 additions & 8 deletions docs/prepare-cdot-clusters.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,29 +127,64 @@ security login role create -role harvest2-role -access readonly -cmddirname "vse
Use this for password authentication

```bash
# If the harvest2 user does not exist, you will be prompted to enter a password
security login create -user-or-group-name harvest2 -application ontapi -role harvest2-role -authentication-method password
security login create -user-or-group-name harvest2 -application http -role harvest2-role -authentication-method password
```

Or this for certificate authentication

```bash
security login create -user-or-group-name harvest2 -application ontapi -role harvest2-role -authentication-method cert
security login create -user-or-group-name harvest2 -application http -role harvest2-role -authentication-method cert
```

Check that the harvest role has web access for ONTAPI and REST.
#### Create REST role

```bash
security login rest-role create -role harvest2-rest-role -access readonly -api /api
```

#### Associate REST role with harvest user

Using password authentication

```bash
security login create -user-or-group-name harvest2 -application http -role harvest2-rest-role -authentication-method password
```

??? failure "If you get an error `command failed: duplicate entry` when running the previous command"
Remove the previous entry and recreate like so:

```bash
security login delete -user-or-group-name harvest2 -application http -authentication-method *
security login create -user-or-group-name harvest2 -application http -role harvest2-rest-role -authentication-method password
```

Using certificate authentication

```bash
security login create -user-or-group-name harvest2 -application http -role harvest2-rest-role -authentication-method cert
```

??? failure "If you get an error `command failed: duplicate entry` when running the previous command"
Remove the previous entry and recreate like so:

```bash
security login delete -user-or-group-name harvest2 -application http -authentication-method *
security login create -user-or-group-name harvest2 -application http -role harvest2-rest-role -authentication-method cert
```

#### Verify that the harvest role has web access
```bash
vserver services web access show -role harvest2-role -name ontapi
vserver services web access show -role harvest2-role -name rest
vserver services web access show -role harvest2-role -name docs-api
vserver services web access show -role harvest2-rest-role -name rest
vserver services web access show -role harvest2-rest-role -name docs-api
```

If either entry is missing, enable access by running the following. Replace `$ADMIN_VSERVER` with your SVM admin name.
If any entries are missing, enable access by running the following. Replace `$ADMIN_VSERVER` with your SVM admin name.
```bash
vserver services web access create -vserver $ADMIN_VSERVER -name ontapi -role harvest2-role
vserver services web access create -vserver $ADMIN_VSERVER -name rest -role harvest2-role
vserver services web access create -vserver $ADMIN_VSERVER -name docs-api -role harvest2-role
vserver services web access create -vserver $ADMIN_VSERVER -name rest -role harvest2-rest-role
vserver services web access create -vserver $ADMIN_VSERVER -name docs-api -role harvest2-rest-role
```

#### 7-Mode CLI
Expand Down
7 changes: 3 additions & 4 deletions integration/test/copy_logs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestNoErrors(t *testing.T) {
}

func checkLogs(t *testing.T, container docker.Container) {
cli := fmt.Sprintf(`docker logs %s 2>&1 | grep -v '%s' | grep -E "ERR"`, container.ID, ignoreList())
cli := fmt.Sprintf(`docker logs %s 2>&1 | grep -Ev '%s' | grep -E "ERR"`, container.ID, ignoreList())
command := exec.Command("bash", "-c", cli)
output, err := command.CombinedOutput()
// The grep checks for matching lines.
Expand All @@ -70,8 +70,7 @@ func checkLogs(t *testing.T, container docker.Container) {
}
}

// ignoreList returns a list of errors that should be ignored
// Only use double quotes (") to group messages, not single quotes
// ignoreList returns a list of regex patterns that will be ignored
func ignoreList() any {
return `RPC: Remote system error|"connection error"`
return `RPC: Remote system error|connection error`
}
Loading