Object protocol further configuration
If the Object protocol was enabled during installation, use the following information to verify the Object protocol configuration and to enable features such as unified file and object access and multi-region object deployment.
Object is currently set up, enabled, and configured by the installation toolkit, but a few additional steps are necessary to ready the Object protocol for use. Verify the Object protocol by running a few tests.
Verifying the Object protocol portion of the installation
Perform the following simple example OpenStack client and unified file and object access commands
to verify your installation. You should be able to list all users and projects (called accounts in
unified file and object access), list the unified file and object access containers, upload a sample
object to a container, and list that container and see the object. These commands should complete
with no
errors.
# source $HOME/openrc
# openstack user list
# openstack project list
# swift stat
# date > object1.txt
# swift upload test_container object1.txt
object1.txt
# swift list test_container
object1.txt
When the SELinux mode is Enforcing and a user on the protocol node needs to run
Swift helper commands, the runcon command must be used. Otherwise, the system
might generate SELinux failure logs. For example, the *.recon files in the
/var/cache/swift directory are updated by Swift helper services such as
replicator and updater.
- To run the helper command, type: runcon -t swift_t -r system_r swift helper command
- To check if the SELinux context is correct, run the matchpathcon command:
matchpathcon -V /var/cache/swift/*The system displays the following output:
/var/cache/swift/account.recon verified. /var/cache/swift/container.recon has context unconfined_u:object_r:var_t:s0, should be system_u:object_r:swift_var_cache_t:s0 /var/cache/swift/object.recon verified.
- To fix the SELinux context in the file, run the restorecon command: restorecon /var/cache/swift/container.recon