Unverified Commit 625cd8a9 authored by Martin Cech's avatar Martin Cech Committed by GitHub
Browse files

Merge pull request #18033 from martenson/storage-details

[24.0] clarify the object store relocate functionality
parents 45827043 b8c39a57
Loading
Loading
Loading
Loading
+6 −8
Original line number Diff line number Diff line
@@ -59,14 +59,7 @@ watch(props, fetch, { immediate: true });

<template>
    <div>
        <h2 v-if="includeTitle" class="h-md">
            Dataset Storage
            <RelocateLink
                v-if="storageInfo"
                :dataset-id="datasetId"
                :dataset-storage-details="storageInfo"
                @relocated="fetch" />
        </h2>
        <h2 v-if="includeTitle" class="h-md">Dataset Storage</h2>
        <div v-if="errorMessage" class="error">{{ errorMessage }}</div>
        <LoadingSpan v-else-if="storageInfo == null"> </LoadingSpan>
        <div v-else-if="discarded">
@@ -84,5 +77,10 @@ watch(props, fetch, { immediate: true });
        <div v-else>
            <DescribeObjectStore what="This dataset is stored in" :storage-info="storageInfo" />
        </div>
        <RelocateLink
            v-if="storageInfo"
            :dataset-id="datasetId"
            :dataset-storage-details="storageInfo"
            @relocated="fetch" />
    </div>
</template>
+9 −4
Original line number Diff line number Diff line
@@ -13,24 +13,26 @@ defineProps<RelocateProps>();

const emit = defineEmits<{
    (e: "relocate", value: string): void;
    (e: "closeModal"): void;
}>();

const fromWhat = "This dataset location in a";
const fromWhat = "This dataset location is";
const toWhat = "This dataset will be relocated to";
</script>

<template>
    <div>
        <p>Relocate the dataset's current object store of:</p>
        <p>Currently the dataset is located in:</p>
        <b-button-group vertical size="lg" class="select-button-group">
            <ObjectStoreSelectButton
                :key="fromObjectStore.object_store_id"
                id-prefix="swap-target"
                class="swap-target-object-store-select-button"
                variant="info"
                :object-store="fromObjectStore" />
                :object-store="fromObjectStore"
                @click="emit('closeModal')" />
        </b-button-group>
        <p>Select a new object store below to relocate the dataset</p>
        <p class="relocate-to">Select new storage location for the dataset:</p>
        <b-button-group vertical size="lg" class="select-button-group">
            <ObjectStoreSelectButton
                v-for="objectStore in targetObjectStores"
@@ -60,4 +62,7 @@ const toWhat = "This dataset will be relocated to";
    margin: auto;
    width: 400px;
}
.relocate-to {
    margin-top: 2em;
}
</style>
+9 −3
Original line number Diff line number Diff line
<script setup lang="ts">
import { BButton } from "bootstrap-vue";
import { storeToRefs } from "pinia";
import { computed, ref } from "vue";

@@ -70,6 +71,10 @@ const emit = defineEmits<{
    (e: "relocated"): void;
}>();

function closeModal() {
    showModal.value = false;
}

async function relocate(objectStoreId: string) {
    try {
        await updateObjectStore(props.datasetId, objectStoreId);
@@ -84,12 +89,13 @@ async function relocate(objectStoreId: string) {

<template>
    <span class="storage-relocate-link">
        <SelectModal v-if="currentObjectStore" v-model="showModal" title="Relocate Dataset Storage">
        <SelectModal v-if="currentObjectStore" v-model="showModal" title="Relocate Dataset">
            <RelocateDialog
                :from-object-store="currentObjectStore"
                :target-object-stores="validTargets"
                @relocate="relocate" />
                @relocate="relocate"
                @closeModal="closeModal" />
        </SelectModal>
        <b-link v-if="relocatable" href="#" @click="showModal = true">(relocate)</b-link>
        <BButton v-if="relocatable" @click="showModal = true">Relocate Dataset</BButton>
    </span>
</template>
+9 −3
Original line number Diff line number Diff line
@@ -61,7 +61,7 @@ backends:
# Sample Distributed Object Store with disk backends configuration
#

# In the distributed object store, existing dataests will be located by the `object_store_id` column in the `dataset`
# In the distributed object store, existing datasets will be located by the `object_store_id` column in the `dataset`
# table of the Galaxy database, which corresponds to the `id` option on the backend. New datasets are created based on
# the `weight` option: a backend with weight "2" has twice the chance of being (randomly) selected for new datasets as a
# backend with weight "1". A weight of "0" will still allow datasets in that backend to be read, but no new datasets
@@ -304,15 +304,20 @@ extra_dirs:
# Tutorial: https://gxy.io/GTN:T00324
#
# In this example, the scratch storage is marked as user-private by setting the `private` option to "true" on the
# backend definition. This means it cannot be used in public datasets, shared between users, etc.. This is more example
# backend definition. This means it cannot be used in public datasets, shared between users, etc.. This is for example
# purposes - you may very well not want scratch storage to be defined as private as it prevents a lot of regular
# functionality and Galaxy handles regularly cleaned datasets fairly gracefully when the appropriate admin scripts are
# used.
#
# It is safe to just relabel the object store that a dataset belongs to if the underlying paths mapped to by the object
# stores are the same and the dataset has not been copied. To enable users to relocate datasets this way set the
# backends' `device` property to the same value.

type: distributed
backends:
  - id: default
    type: disk
    device: device1
    weight: 1
    allow_selection: true
    name: Default Galaxy Storage
@@ -329,6 +334,7 @@ backends:
          found on our [Archive Tier Storage](https://www.msi.umn.edu/content/archive-tier-storage) page.
  - id: scratch
    type: disk
    device: device2
    weight: 0
    allow_selection: true
    private: true
+8 −3
Original line number Diff line number Diff line
@@ -62,7 +62,7 @@
<!--
    Sample Distributed Object Store with disk backends

    In the distributed object store, existing dataests will be located by the
    In the distributed object store, existing datasets will be located by the
    `object_store_id` column in the `dataset` table of the Galaxy database,
    which corresponds to the `id` attribute on the backend tag. New datasets are
    created based on the "weight" attribute: a backend with weight "2" has a
@@ -272,11 +272,16 @@
    of regular functionality and Galaxy handles regularly cleaned
    datasets fairly gracefully when the appropriate admin scripts
    are used.

    It is safe to just relabel the object store that a dataset belongs
    to if the underlying paths mapped to by the object stores are the
    same and the dataset has not been copied. To enable users to relocate
    datasets this way set the backends' `device` property to the same value.
-->
<!--
<object_store type="distributed">
    <backends>
        <backend id="default" allow_selection="true" type="disk" weight="1" name="Default Galaxy Storage">
        <backend id="default" allow_selection="true" type="disk" device="device1" weight="1" name="Default Galaxy Storage">
            <description>This is Galaxy's default object store - this disk is regularly backed up and all user's have a default quota of 200 GB.
            </description>
            <files_dir path="database/objects/deafult"/>
@@ -286,7 +291,7 @@
                <backed_up>Backed up to Galaxy's institutional long term tape drive nightly. More information about our tape drive can be found on our [Archive Tier Storage](https://www.msi.umn.edu/content/archive-tier-storage) page.</backed_up>
            </badges>
        </backend>
        <backend id="scratch" allow_selection="true" type="disk" weight="0" name="Scratch Storage" private="true">
        <backend id="scratch" allow_selection="true" type="disk" device="device2" weight="0" name="Scratch Storage" private="true">
            <quota source="second_tier" />
            <description>This object store is connected to institutional scratch storage. This disk is not backed up and private to your user and datasets belonging to this storage will be automatically deleted after one month.
</description>