Skip to content

Commit

Permalink
Merge branch 'main' into canonical-monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyhella authored Jul 26, 2023
2 parents 69b8c94 + 8a79741 commit 3c2d0e2
Show file tree
Hide file tree
Showing 29 changed files with 188 additions and 9 deletions.
3 changes: 2 additions & 1 deletion docs/advanced/addons.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ v1.1.0 currently ships with two Addons:
_Available as of v1.2.0_

v1.2.0 ships with two more Addons:

* [rancher-monitoring](../monitoring/harvester-monitoring.md)
* [rancher-logging](../logging/logging.md)
* [rancher-logging](../logging/harvester-logging.md)

![](/img/v1.2/addons/AddonsV120.png)
2 changes: 1 addition & 1 deletion docs/logging/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"collapsed": false,
"link": {
"type": "doc",
"id": "logging"
"id": "harvester-logging"
}
}
8 changes: 6 additions & 2 deletions docs/logging/logging.md → docs/logging/harvester-logging.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
---
sidebar_position: 1
sidebar_label: Logging Audit Event
title: "Logging Audit Event"
sidebar_label: Logging
title: "Logging"
keywords:
- Harvester
- Logging
- Audit
- Event
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/logging/harvester-logging"/>
</head>

_Available as of v1.1.0_

It is important to know what is happening/has happened in the `Harvester Cluster`.
Expand Down
65 changes: 65 additions & 0 deletions docs/upgrade/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,68 @@ The Harvester controller deletes the upgrade repository VM and all files that ar
```

4. Click the upgrade button in the Harvester dashboard to start an upgrade again.

### Download upgrade logs

We have designed and implemented a mechanism to automatically collect all the upgrade-related logs and display the upgrade procedure. By default, this is enabled. You can also choose to opt out of such behavior.

![The "Enable Logging" checkbox on the upgrade confirmation dialog](/img/v1.2/upgrade/enable_logging.png)

You can click the **Download Log** button to download the log archive during an upgrade.

![Download the upgrade log archive by clicking the "Download Log" button on the upgrade dialog](/img/v1.2/upgrade/download_upgradelog_dialog.png)

Log entries will be collected as files for each upgrade-related Pod, even for intermediate Pods. The support bundle provides a snapshot of the current state of the cluster, including logs and resource manifests, while the upgrade log preserves any logs generated during an upgrade. By combining these two, you can further investigate the issues during upgrades.

![The upgrade log archive contains all the logs generated by the upgrade-related Pods](/img/v1.2/upgrade/upgradelog_archive.png)

After the upgrade ended, Harvester stops collecting the upgrade logs to avoid occupying the disk space. In addition, you can click the **Dismiss it** button to purge the upgrade logs.

![The upgrade log archive contains all the logs generated by the upgrade-related Pods](/img/v1.2/upgrade/dismiss_upgrade_to_remove_upgradelog.png)

For more details, please refer to the [upgrade log HEP](https://github.com/harvester/harvester/blob/master/enhancements/20221207-upgrade-observability.md).

:::caution

The storage volume for storing upgrade-related logs is 1GB by default. If an upgrade went into issues, the logs may consume all the available space of the volume. To work around such kind of incidents, try the following steps:

1. Detach the `log-archive` Volume by scaling down the `fluentd` StatefulSet and `downloader` Deployment.

```
# Locate the StatefulSet and Deployment
$ kubectl -n harvester-system get statefulsets -l harvesterhci.io/upgradeLogComponent=aggregator
NAME READY AGE
hvst-upgrade-xxxxx-upgradelog-infra-fluentd 1/1 43s
$ kubectl -n harvester-system get deployments -l harvesterhci.io/upgradeLogComponent=downloader
NAME READY UP-TO-DATE AVAILABLE AGE
hvst-upgrade-xxxxx-upgradelog-downloader 1/1 1 1 38s
# Scale down the resources to terminate any Pods using the volume
$ kubectl -n harvester-system scale statefulset hvst-upgrade-xxxxx-upgradelog-infra-fluentd --replicas=0
statefulset.apps/hvst-upgrade-xxxxx-upgradelog-infra-fluentd scaled
$ kubectl -n harvester-system scale deployment hvst-upgrade-xxxxx-upgradelog-downloader --replicas=0
deployment.apps/hvst-upgrade-xxxxx-upgradelog-downloader scaled
```

2. Expand the volume size via Longhorn dashboard. For more details, please refer to [the volume expansion guide](https://longhorn.io/docs/1.3.2/volumes-and-nodes/expansion/).

```
# Here's how to find out the actual name of the target volume
$ kubectl -n harvester-system get pvc -l harvesterhci.io/upgradeLogComponent=log-archive -o jsonpath='{.items[].spec.volumeName}'
pvc-63355afb-ce61-46c4-8781-377cf962278a
```

3. Recover the `fluentd` StatefulSet and `downloader` Deployment.

```
$ kubectl -n harvester-system scale statefulset hvst-upgrade-xxxxx-upgradelog-infra-fluentd --replicas=1
statefulset.apps/hvst-upgrade-xxxxx-upgradelog-infra-fluentd scaled
$ kubectl -n harvester-system scale deployment hvst-upgrade-xxxxx-upgradelog-downloader --replicas=1
deployment.apps/hvst-upgrade-xxxxx-upgradelog-downloader scaled
```

:::
4 changes: 4 additions & 0 deletions docs/volume/clone-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Clone volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/clone-volume"/>
</head>

After creating a volume, you can clone the volume by following the steps below:

1. Click the `` button and select the `Clone` option.
Expand Down
4 changes: 4 additions & 0 deletions docs/volume/create-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Create a volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/create-volume"/>
</head>

## Create an Empty Volume

### Header Section
Expand Down
4 changes: 4 additions & 0 deletions docs/volume/edit-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Edit volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/edit-volume"/>
</head>

After creating a volume, you can edit your volume by clicking the `` button and selecting the `Edit Config` option.

## Expand a Volume
Expand Down
4 changes: 4 additions & 0 deletions docs/volume/export-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Export volume to image from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/export-volume"/>
</head>

You can select and export an existing volume to an image by following the steps below:

1. Click the `` button and select the `Export Image` option.
Expand Down
4 changes: 4 additions & 0 deletions docs/volume/volume-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ keywords:
Description: Take a snapshot for a volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/volume-snapshots"/>
</head>

## Create Volume Snapshots

:::note
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"collapsed": false,
"link": {
"type": "doc",
"id": "logging"
"id": "harvester-logging"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"collapsed": false,
"link": {
"type": "doc",
"id": "logging"
"id": "harvester-logging"
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.1/upgrade/enable_logging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.1/upgrade/upgradelog_archive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.2/upgrade/enable_logging.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added static/img/v1.2/upgrade/upgradelog_archive.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion versioned_docs/version-v1.1/logging/_category_.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@
"collapsed": false,
"link": {
"type": "doc",
"id": "logging"
"id": "harvester-logging"
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,18 @@
---
sidebar_position: 1
sidebar_label: Logging Audit Event
title: "Logging Audit Event"
sidebar_label: Logging
title: "Logging"
keywords:
- Harvester
- Logging
- Audit
- Event
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/logging/harvester-logging"/>
</head>

_Available as of v1.1.0_

It is important to know what is happening/has happened in the `Harvester Cluster`.
Expand Down
65 changes: 65 additions & 0 deletions versioned_docs/version-v1.1/upgrade/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,3 +135,68 @@ The Harvester controller deletes the upgrade repository VM and all files that ar
```

4. Click the upgrade button in the Harvester dashboard to start an upgrade again.

### Download upgrade logs

We have designed and implemented a mechanism to automatically collect all the upgrade-related logs and display the upgrade procedure. By default, this is enabled. You can also choose to opt out of such behavior.

![The "Enable Logging" checkbox on the upgrade confirmation dialog](/img/v1.1/upgrade/enable_logging.png)

You can click the **Download Log** button to download the log archive during an upgrade.

![Download the upgrade log archive by clicking the "Download Log" button on the upgrade dialog](/img/v1.1/upgrade/download_upgradelog_dialog.png)

Log entries will be collected as files for each upgrade-related Pod, even for intermediate Pods. The support bundle provides a snapshot of the current state of the cluster, including logs and resource manifests, while the upgrade log preserves any logs generated during an upgrade. By combining these two, you can further investigate the issues during upgrades.

![The upgrade log archive contains all the logs generated by the upgrade-related Pods](/img/v1.1/upgrade/upgradelog_archive.png)

After the upgrade ended, Harvester stops collecting the upgrade logs to avoid occupying the disk space. In addition, you can click the **Dismiss it** button to purge the upgrade logs.

![The upgrade log archive contains all the logs generated by the upgrade-related Pods](/img/v1.1/upgrade/dismiss_upgrade_to_remove_upgradelog.png)

For more details, please refer to the [upgrade log HEP](https://github.com/harvester/harvester/blob/master/enhancements/20221207-upgrade-observability.md).

:::caution

The storage volume for storing upgrade-related logs is 1GB by default. If an upgrade went into issues, the logs may consume all the available space of the volume. To work around such kind of incidents, try the following steps:

1. Detach the `log-archive` Volume by scaling down the `fluentd` StatefulSet and `downloader` Deployment.

```
# Locate the StatefulSet and Deployment
$ kubectl -n harvester-system get statefulsets -l harvesterhci.io/upgradeLogComponent=aggregator
NAME READY AGE
hvst-upgrade-xxxxx-upgradelog-infra-fluentd 1/1 43s
$ kubectl -n harvester-system get deployments -l harvesterhci.io/upgradeLogComponent=downloader
NAME READY UP-TO-DATE AVAILABLE AGE
hvst-upgrade-xxxxx-upgradelog-downloader 1/1 1 1 38s
# Scale down the resources to terminate any Pods using the volume
$ kubectl -n harvester-system scale statefulset hvst-upgrade-xxxxx-upgradelog-infra-fluentd --replicas=0
statefulset.apps/hvst-upgrade-xxxxx-upgradelog-infra-fluentd scaled
$ kubectl -n harvester-system scale deployment hvst-upgrade-xxxxx-upgradelog-downloader --replicas=0
deployment.apps/hvst-upgrade-xxxxx-upgradelog-downloader scaled
```

2. Find out and expand the `log-archive` volume size via the Longhorn dashboard. For more details, please refer to [the volume expansion guide](https://longhorn.io/docs/1.3.2/volumes-and-nodes/expansion/).

```
# Here's how to find out the actual name of the target volume
$ kubectl -n harvester-system get pvc -l harvesterhci.io/upgradeLogComponent=log-archive -o jsonpath='{.items[].spec.volumeName}'
pvc-63355afb-ce61-46c4-8781-377cf962278a
```

3. Recover the `fluentd` StatefulSet and `downloader` Deployment.

```
$ kubectl -n harvester-system scale statefulset hvst-upgrade-xxxxx-upgradelog-infra-fluentd --replicas=1
statefulset.apps/hvst-upgrade-xxxxx-upgradelog-infra-fluentd scaled
$ kubectl -n harvester-system scale deployment hvst-upgrade-xxxxx-upgradelog-downloader --replicas=1
deployment.apps/hvst-upgrade-xxxxx-upgradelog-downloader scaled
```

:::
4 changes: 4 additions & 0 deletions versioned_docs/version-v1.1/volume/clone-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Clone volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/clone-volume"/>
</head>

After creating a volume, you can clone the volume by following the steps below:

1. Click the `` button and select the `Clone` option.
Expand Down
4 changes: 4 additions & 0 deletions versioned_docs/version-v1.1/volume/create-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Create a volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/create-volume"/>
</head>

## Create an Empty Volume

### Header Section
Expand Down
4 changes: 4 additions & 0 deletions versioned_docs/version-v1.1/volume/edit-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Edit volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/edit-volume"/>
</head>

After creating a volume, you can edit your volume by clicking the `` button and selecting the `Edit Config` option.

## Expand a Volume
Expand Down
4 changes: 4 additions & 0 deletions versioned_docs/version-v1.1/volume/export-volume.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ keywords:
Description: Export volume to image from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/export-volume"/>
</head>

You can select and export an existing volume to an image by following the steps below:

1. Click the `` button and select the `Export Image` option.
Expand Down
4 changes: 4 additions & 0 deletions versioned_docs/version-v1.1/volume/volume-snapshots.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ keywords:
Description: Take a snapshot for a volume from the Volume page.
---

<head>
<link rel="canonical" href="https://docs.harvesterhci.io/v1.1/volume/volume-snapshots"/>
</head>

## Create Volume Snapshots

:::note
Expand Down

0 comments on commit 3c2d0e2

Please sign in to comment.