Überprüfen Sie den Betrieb

Überprüfen Sie den Betrieb

Verify operation of the Object Storage service.

Bemerkung

Führen Sie diese Schritte auf dem Controller Node durch.

Warnung

If one or more of these steps do not work, check the /var/log/audit/audit.log file for SELinux messages indicating denial of actions for the swift processes. If present, change the security context of the /srv/node directory to the lowest security level (s0) for the swift_data_t type, object_r role and the system_u user:

# chcon -R system_u:object_r:swift_data_t:s0 /srv/node
  1. Sourcen Sie die demo Anmeldeinformationen:

    $ . demo-openrc
    
  2. Dienststatus anzeigen lassen:

    $ swift stat
                            Account: AUTH_ed0b60bf607743088218b0a533d5943f
                         Containers: 0
                            Objects: 0
                              Bytes: 0
    Containers in policy "policy-0": 0
       Objects in policy "policy-0": 0
         Bytes in policy "policy-0": 0
        X-Account-Project-Domain-Id: default
                        X-Timestamp: 1444143887.71539
                         X-Trans-Id: tx1396aeaf17254e94beb34-0056143bde
                       Content-Type: text/plain; charset=utf-8
                      Accept-Ranges: bytes
    
  3. Create container1 container:

    $ openstack container create container1
    +---------------------------------------+------------+------------------------------------+
    | account                               | container  | x-trans-id                         |
    +---------------------------------------+------------+------------------------------------+
    | AUTH_ed0b60bf607743088218b0a533d5943f | container1 | tx8c4034dc306c44dd8cd68-0056f00a4a |
    +---------------------------------------+------------+------------------------------------+
    
  4. Laden Sie eine Testdatei zum Container container1 hoch:

    $ openstack object create container1 FILE
    +--------+------------+----------------------------------+
    | object | container  | etag                             |
    +--------+------------+----------------------------------+
    | FILE   | container1 | ee1eca47dc88f4879d8a229cc70a07c6 |
    +--------+------------+----------------------------------+
    

    Ersetzen Sie DATEI durch den Namen einer lokalen Datei und laden diese zum Container container1 hoch.

  5. Lassen Sie alle Dateien im Container container1 anzeigen:

    $ openstack object list container1
    +------+
    | Name |
    +------+
    | FILE |
    +------+
    
  6. Laden Sie eine Testdatei vom Container container1 herunter:

    $ openstack object save container1 FILE
    

    Ersetzen Sie DATEI durch den Namen der zum Container container1 hochgeladenen Datei.

    Bemerkung

    Das Kommando erzeugt keine Ausgabe.

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.