738 Commits

Author SHA1 Message Date
khashf
bd16ab256e Add warning and note on image schema customization docs
An operator can modify /etc/schema-image.json to include arbitrary
properties (which was that file's original purpose) and assign them JSON
types other than 'string'. The type is enforced by image create/update
but an end-user making a call that sets a value on one of these gets a
500.

This patch add the following recommendations to the documentation:
- Value of `type` of each property in the JSON scheme must be `string`
- Do not delete items from the default schema-image.json file
- If operator's need is more complicated, suggest them using metadefs

Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I879f4440a14b1e8420e230de84bfba5e0419a4d4
Closes-bug: #1856578
2020-04-15 09:16:30 -07:00
Zuul
fa18f745df Merge "Revise admin interoperable image import docs" 2020-04-14 14:45:47 +00:00
Zuul
8ccda62a21 Merge "Update 'common image properties' doc" 2020-04-14 14:45:44 +00:00
Abhishek Kekane
534dc9741a Ussuri final release notes
(Also hit a few lines in the docs affected by the heading-as-anchor
case sensitivity issue from Sphinx 3.0.0.)

Change-Id: Idc031028f6f78635c9836f9ef082f0eef632eb2f
2020-04-13 10:39:33 -04:00
Zuul
a14bd83f3e Merge "Do not decompress 'compressed' containers" 2020-04-09 11:40:16 +00:00
khashf
984e844c6a Update 'common image properties' doc
Update doc/source/user/common-image-properties.rst (live link [1]) to be
in sync with etc/schema-image.json

This patch does 2 actions:
1. Add the missing properties that are in etc/schema-image.json to
   the doc
2. Rearrange the order of appearance of properties in the doc to be
   the same as they appear in etc/schema-image.json

[1] docs.openstack.org/glance/latest/user/common-image-properties.html

Change-Id: I840f3cbeda28da8b02dd141fde582c9110aeb21e
Closes-bug: #1870336
2020-04-07 17:44:39 -07:00
Naohiro Sameshima
9e17151bdc Add description of how to use S3 driver
There is no description about S3 on the current page of Glance
Configuration Options Docs. So, add description which is required
to use the s3 driver.

Change-Id: I04373474f94537e2145f6acc30dded8cddc5ad3b
2020-04-07 19:46:32 +00:00
Zuul
2f2e118a58 Merge "Add Policy enforcement for several Metadata Definition delete APIs" 2020-04-07 19:29:26 +00:00
Erno Kuvaja
a2e0fb61e9 Do not decompress 'compressed' containers
Do not decompress the image if container_format is compressed

Change-Id: I913d9bf11479d2519f7887e42626e9e386d83d7a
2020-04-07 10:46:30 +01:00
Zuul
2d21685ee4 Merge "Remove all references to sheepdog" 2020-04-07 04:05:36 +00:00
khashf
30f821c624 Revise admin interoperable image import docs
This patch revises the documentation of the interoperable image import
feature available to admin operators to concisely describe Stein and
later releases.

Changes include:
- Remove enable_image_import option because it is no longer available
  since the release of Stein
- Simplify the language of the v1 API being deprecated

Change-Id: Ic155afd6de5b37a25743457e9a7ddd5a45dac4e8
Closes-Bug: #1808814
2020-04-06 15:43:21 -07:00
Sean McGinnis
d021dcc88d
Update uWSGI doc definition names
An update appears to have now made Sphinx definition titles case
insensitive, causing errors in our Apache wsgi docs where we define 'uwsgi'
the protocol and 'uWSGI' the project.

This change gets around those errors by appending 'protocol' and
'project' respectively to make the entries unique.

Change-Id: I7c1d57cf3181945c69397f870465f693b67efca2
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-06 11:30:20 -05:00
Rick Bartra
d2cc0dc566 Add Policy enforcement for several Metadata Definition delete APIs
Several Metadata Definition delete APIs do not have RBAC. This
patchset add policy enforcment to the following APIs:

    - `Delete namespace`
    - `Delete object`
    - `Remove resource type association`
    - `Remove property definition`
    - `Delete tag definition`
    - `Delete all tag definitions`

The following actions are enforce and added to the policy.json:

    - `delete_metadef_namespace`
    - `delete_metadef_object`
    - `remove_metadef_resource_type_association`
    - `remove_metadef_property`
    - `delete_metadef_tag`
    - `delete_metadef_tags`

Most other APIs have policy enforcement, so the ones above should as
well. Without adding policy enforcement for the above APIs, all roles
can peform the delete APIs noted above.

Change-Id: I8cd6eb26b0d3401fa4667384c31e4c56d838d42b
Closes-Bug: #1782840
Co-Authored-By: julian.sy@att.com
2020-04-06 14:47:05 +00:00
Cyril Roelandt
772bae36ea Remove all references to sheepdog
The sheepdog driver has recently been removed from glance_store.

Change-Id: I58f0d20cadfae7a7df8b5dce6d8d4c66eaa2a148
2020-04-02 15:39:57 -05:00
Andreas Jaeger
89df136bc4 Update hacking and reenable local checks
Update to hacking 3.0.

Enable local hacking checks again, newer flake has a different
interface.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Unbreak docs:
Don't build apidocs for hacking - blacklist in doc/source/conf.py.

Change-Id: Ib230d72be9f0288d77cecd2c5ee0ff7aa91fc086
2020-04-02 18:00:44 +02:00
Andreas Jaeger
176d24de94 Cleanup old cruft
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Update requirements: Remove sphinx, it's not needed for testing, add
  pygments which is really needed.
- Update doc/requirements: Remove python 2.7 support
- tox.ini: Remove testing of po files, the infra scripts do this since
  a long time
- Update conf.py, no need to import openstackdocstheme anymore.

Change-Id: I9d030eb450f2c7ae74c25b7564a01b8785503e5e
2020-03-28 08:18:01 +01:00
Erno Kuvaja
e0c5440819 Add decompression import plugin
Supported compression formats initially are:
* zip
* gzip
* lha/lzh _if_ lhafile is installed

Change-Id: Id125ebb5e8a9b22a8797d3158e60451d80bfaa14
2020-03-26 15:44:59 +00:00
Erno Kuvaja
f267bd6cde Add possibility to delete image from single store
This change introduces new 'v2/stores/<store_id>/<image_id>'
endpoint that accepts 'DELETE' method request. Once successful
the request will delete the image <image_id>'s location that
matches the store <store_id>. If the store is not read-only
or return image in use exception the image data will be
deleted. In the case of read-only store, the location will
be removed and if the image in use is raised, the call will
fail.

bp: delete-from-store

Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I1cb45026489a96a283b82e8e7efc9975c181fceb
2020-03-13 14:46:13 +00:00
Abhishek Kekane
d6a56f7c10 Community Goal: Project PTL & Contrib Docs Update
This patch standardizes the CONTRIBUTING.rst file and adds the
required doc/source/contributor/contributing.rst

Change-Id: I3f7ee29094085f1abefacd75f44a16fb7e679a82
Story: #2007236
Task: #38523
2020-03-11 06:09:47 +00:00
Zuul
2f91ae61d2 Merge "Multiple import fails if "all_stores" specified as "true"" 2020-02-24 17:27:16 +00:00
Russell Tweed
517ff4fbe4 Document os_admin_user in Useful Image Properties
Add documentation of the os_admin_user property to the Useful Image Properties guide.

Change-Id: I10e1e738aeacc708350993f05d373eaa1293fd27
Closes-Bug: 1850412
2020-02-21 11:22:44 +00:00
Abhishek Kekane
d7de7ccbd6 Multiple import fails if "all_stores" specified as "true"
Newly added multiple import fails if user passes "all_stores" as "true"
in the request. The reason is if all_stores is specified then we are getting
stores using CONF.enabled_backends and unfortunately we are injecting
reserved stores 'os_glance_staging_store' and 'os_glance_tasks_store'
runtime. As a result import job tries to import the image in the
'os_glance_staging_store' store as well where it fails as that image
is already staged in this staging store.

Made a provision to exclude available reserved stores if "all_stores"
is specified.

Change-Id: If2616c275a969cdad5649e2cb0851275e5d0c7d2
Closes-Bug: #1863879
2020-02-19 12:03:58 +00:00
Ian Wienand
0035ab2538 Revert "Remove all example configs for deprecated registry"
This reverts commit 2a28696de9e18a3866631507739944ceb3460872.

Devstack still references a number of these files; revert until
devstack incorporates removal.

Change-Id: I1e90ceee1f87291668e447f180f37bb809763836
2020-02-14 14:30:44 +11:00
Erno Kuvaja
2a28696de9 Remove all example configs for deprecated registry
Including removal if the example conf in docs.

Change-Id: I00c77b8f7001d8fa0fde4083c2ee88c370c14a09
2020-02-13 15:33:50 +00:00
Abhishek Kekane
1754c9e2b0 Copy existing image in multiple stores
Added new import method 'copy-image' which will copy existing image into
specified list of stores. Introduced additional task which will serve
as internal plugin which will allow copying existing image into staging
area and then this data will be uploaded to specified stores via regula
import flow.

NOTE: This new import method 'copy-image' is only supported if multiple
stores are enabled in deployment.

APIImpact
Implements: blueprint copy-existing-image
Change-Id: I13eaab7ab013f44ce18465bdbdbe8052942570ff
2020-02-12 05:32:46 +00:00
Grégoire Unbekandt
92492cf504 Add ability to import image into multi-stores
The import image api now supports a list of stores to import data into.
This list can be specified through a new "stores" field that has been
added to the request body.
During import stage, Glance iterates overs this list and send the data
to each store one by one.
If an invalid backend is requested by the user, an exception is raised.
If an errors occurs during verify, already pushed data is removed and
image state is unchanged.

Change-Id: Id3ac19488c0a693d7042be4a3c83f3b9f12313d0
Implements: blueprint import-multi-stores
2020-02-10 09:39:01 +01:00
Akihiro Motoki
b6ceda28a4 doc: Clean up unnecessary left vertical lines
In HTML documents with openstackdocstheme, vertical lines are shown
at the left side for literal blocks. Indented blocks are considered
as literal blocks in ReST text.
Unnecessary indented blocks are found in the glance document and
it leads to blocks with unexpected vertical left lines and
sometimes with unexpected fonts like [1].
Unexpected literal blocks are cleanup.

This commit also converts Definition lists in user/formats.rst and
user/common-image-properties.rst into the proper way in ReST text.

[1] https://docs.openstack.org/glance/latest/user/formats.html#container-format

Change-Id: I1b026f919bb22a59d23e3bb93bb7919d202a62fc
2019-12-23 13:58:32 +00:00
Zuul
b24a58e9c5 Merge "doc: add link to release notes" 2019-12-13 22:21:28 +00:00
Zuul
4e8afee0be Merge "useful-image-properties: Update note on machine types" 2019-12-13 22:21:26 +00:00
Erno Kuvaja
c540d54a35 Fix old --public from install verify docs
Change-Id: I4128eb7e8d6a6827026d4454e1eaba188e19cf3a
Closes-Bug: #1852835
2019-11-18 14:17:08 +00:00
Abhishek Kekane
6dba83ba3a Rethinking filesystem access
In Rocky multiple backend support is added as experimental feature. In
order to take advantage of this feature it is decided to deprecate
work_dir and node_staging_uri configuration options
and reserve two filesystem stores 'os_glance_tasks_store' and
'os_glance_staging_store', which can be used to get rid of initializing
store via internal functions.

These internal stores are considered "reserved stores" by Glance.
For the time being, these are hard-coded as filesystem stores.  The
store prefix 'os_glance_' is reserved for internal Glance use and
the glance-api service will refuse to start if a store with this
prefix is included in the enabled_backends config option in
glance-api.conf.

NOTE: Because there are no sensible default values for the location
of the datadir for each of these stores, the operator must define
'os_glance_tasks_store' and 'os_glance_staging_store' in
glance-api.conf configuration file as shown below.

[os_glance_tasks_store]
filesystem_store_datadir = /var/lib/glance/tasks_work_dir/

[os_glance_staging_store]
filesystem_store_datadir = /var/lib/glance/staging/

Each filesystem store must have a unique datadir.

Depends-On: https://review.openstack.org/#/c/639765/
Implements: blueprint rethinking-filesystem-access
Change-Id: I86ec513c5fc653dbb97b79d953d8430f014e684f
2019-10-01 09:53:48 +00:00
Erno Kuvaja
82697983c0 Use glance as example in docs instead of osc
This patch also removes casual suggestion to turn on show multiple
locations. This feature has been idetified as vulnerability and
we should not advise turning it on without explaining the specific
use cases where it might be necessary.

Co-authored-by: Erno Kuvaja <jokke@usr.fi>
Co-authored-by: Brian Rosmaita <rosmaita.fossdev@gmail.com>

Change-Id: I65952f70f0216d227ca14d1098d264208913e4e5
2019-09-27 19:21:09 +02:00
Kashyap Chamarthy
52127a692a useful-image-properties: Update note on machine types
For ARMv7 and AArch64, Nova uses the 'virt' machine type as the default.
Update the docs to reflect that.

Refer to this commit in Nova:

    https://opendev.org/openstack/nova/commit/e155baefb0
    (libvirt: Use 'virt' as the default machine type for ARMv7,
    2018-09-14)

Change-Id: I13793dded976fdf872ca0ea779a7f6cbee98118f
Signed-off-by: Kashyap Chamarthy <kchamart@redhat.com>
2019-09-13 10:12:30 +02:00
Adam Spiers
3a281b9bc6 Add SEV-related extra spec and image properties
The AMD SEV support recently introduced to nova[0] depends on certain
metadata properties for flavors and images which were either missing
or only partially covered by existing glance metadata, so fill the
missing gaps:

- Add the hw:mem_encryption flavor extra spec and corresponding
  hw_mem_encryption image property.

- hw_firmware_type has been supported by nova for quite a while,
  so register it as an official metadata property.

- Add hw_cdrom_bus which was missing as per
  https://bugs.launchpad.net/glance/+bug/1808868.  This shares
  values with hw_disk_bus, so document that too.

[0] https://docs.openstack.org/nova/latest/admin/configuration/hypervisor-kvm.html#amd-sev-secure-encrypted-virtualization

Closes-Bug: 1808868
Change-Id: I8116565ad0326d0125b320d840d787edcb086aa9
2019-09-12 19:58:27 +01:00
Abhishek Kekane
73fefddd96 Add periodic job to prefetch images into cache
Added new periodic job which will run as per interval set using
'cache_prefetcher_interval' configuration option and fetch images
which are queued for caching in cache directory.

DocImpact
Change-Id: If2875f7a215aca10a6ed2febc89b02219f90a10d
2019-09-10 15:01:58 +00:00
Zuul
ca00b48e59 Merge "add metadef vlaues for new video models" 2019-09-06 12:03:03 +00:00
Zuul
1b6ae384af Merge "add hw_pmu metadef" 2019-09-06 03:13:48 +00:00
Zuul
d105390c62 Merge "Update hw_rng_model image property doc" 2019-09-04 14:34:45 +00:00
Zuul
3d2c1c104f Merge "Remove glance-registry stuff" 2019-09-04 14:34:43 +00:00
Brian Rosmaita
c3e0b8436a Add disk format content from Image Guide
The container_format and disk_format identifiers and their
descriptions are being maintained in the Glance docs.  Move some
useful content on this topic over from the Image Guide before
deleting it over there so it's only being maintained in one
location.

Change-Id: Ifa8de9d3a3a2aa78ee305aaebb23cd982b02dd91
Partial-bug: #1842343
2019-09-02 21:16:40 -04:00
Zuul
e9353d7861 Merge "Add 'compressed' option to container_format" 2019-08-28 23:00:10 +00:00
ZhengMa
43aa047922 Add 'compressed' option to container_format
This patch is purposed to support a new container_format
so that we can do image compression when uploading a volume
to glance and decompression when downloading a image from
glance.

This patch includes:

1. A new container_format option: 'compressed'.

2. Unit test for new option.

DocImpact
Implements: blueprint leverage-compression-accelerator

Depends-On: https://review.opendev.org/#/c/670454/
Change-Id: I62159315346e99522740383dd4bb5d2cc0ee368d
2019-08-28 03:01:48 +00:00
Sean Mooney
5bdefff5cd add metadef vlaues for new video models
- This change adds the newly supported libvirt
  video models, virtio, gop and none.
- This change updates the train metadefs changes
  release note.

Change-Id: I440a038b53825b5f92fc977566edcf3cabfba673
2019-08-21 01:18:07 +01:00
Sean Mooney
2998c795ed add hw_pmu metadef
This change adds a new hw_pmu metadef property to the
OS::Compute::LibvirtImage namespace and extends the train
metadef changes releasenote.

Depends-on: https://review.opendev.org/#/c/671338/
Change-Id: I2f4e7ef4f816afbd0524a6265d5605afa1da5f86
2019-08-21 01:06:04 +01:00
Alexandra Settle
f5283d8b54 Updating Ceph 404 URLs
Updating to latest URL. Although this is probably
best double checked as this was quite hard to
find and inconsistent since the website has moved
and changed a lot.

Change-Id: Ia6a1c4ae557853dce7ac4cfa1adc3df774121121
backport: stein rocky
2019-08-09 13:47:25 +10:00
Brian Rosmaita
bdb3c37142 doc: add link to release notes
We want people to pay attention to the release notes, so add a
link to the Glance docs landing page.

Change-Id: I8327dc56574ac96d77fbab6f70758c6c6d78811a
2019-08-08 22:15:51 -04:00
Andreas Jaeger
15609a11bd Update api-ref location
The api documentation is now published on docs.openstack.org instead
of developer.openstack.org. Update all links that are changed to the
new location.

Note that redirects will be set up as well but let's point now to the
new location.

For details, see:
http://lists.openstack.org/pipermail/openstack-discuss/2019-July/007828.html

Change-Id: I17c97cb7655bdedc3927f4883b45ba4dcfc55516
2019-07-22 19:15:05 +02:00
Zuul
a7b6d1eaa8 Merge "Bump openstackdocstheme to 1.20.0" 2019-07-17 17:11:28 +00:00
zengjia
d319acbd64 Update the glance installation page
Modifying Version Description Errors in Web Page

Change-Id: I72fe9b60f9380810e952e90f48ee226c682fff2f
2019-07-04 09:46:04 +08:00
翟小君
d4d045f31a Bump openstackdocstheme to 1.20.0
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.

Change-Id: Ica74f2982a75e3faf7a5244390f2299381eb5b89
2019-07-02 09:52:19 +08:00