I can't delete container and objects by object storage swift - storage

When I delete a container by swift, the following error occurrs.
$ swift -A http://192.168.1.120:8010/auth/v1.0 -U
test:vo8AlYgTxchsh37YF1mm -K cqAIBc9B3mIGvJt5DbDmkG3j6Vi0OaEa delete -a
・・・
Error Deleting: test: Container DELETE failed: http://192.168.1.120:8010/v1/AUTH_test/test 409 Conflict [first 60
chars of response] <html><h1>Conflict</h1><p>There was a conflict when
trying t
The environment is as follows.
Storage is Object storage swift. (QNAP application)
CentOS7(Client side)
yum update
yum install python-setuptools
yum install epel-release
yum install python-pip --enablerepo=epel
pip install python-swiftclient
I would appreciate it if you could give me advice.

You cant delete a container without deleting the objects inside them.If that's not the case more probable that there are multiple objects/containers with the same name.

Related

No address associated with hostname inside docker container

I am using a customized version of Ubuntu18.04 and I have a docker container where I tried to install a .deb package for the usage of a FLIR camera. To do so I downloaded from this website the file spinnaker-2.5.0.80-Ubuntu18.04-arm64-pkg.tar.gz, as suggested for Ubuntu18.04.
I followed those instructions to install everything, which basically means the following commands:
apt-get install libusb-1.0-0
tar xvfz spinnaker-2.5.0.80-Ubuntu18.04-arm64-pkg.tar.gz
cd spinnaker-2.5.0.80-arm64
./install_spinnaker_arm.sh
During this process the first errors arose, which I could fix through the installation of iputils-ping and lsb-release inside the docker container:
apt install iputils-ping
apt install -y lsb-release
However, afterwards another error arose:
/var/lib/dpkg/tmp.ci/preinst: 28 /var/lib/dpkg/tmp.ci/preinst: errmsg: not found
dpkg: error processing archive libspinnaker_2.5.0.80_arm64.deb (--install):
new libspinnaker package pre-installation script subprocess returned error exit status 127
ping: zone2.flir.net: No address associated with hostname
Errors were encountered while processing:
libspinnaker_2.5.0.80_arm64.deb
I though it is a nework issue inside the container but I do have internet connection, which I checked through:
ping www.google.com
Does anybody has a suggestion why I am not able to install the spinnaker SDK inside my docker container? Or has an explanation for me, what "no address associated with hostname" means? I am thankfull for every hint in any direction. Maybe it is an issue because I moved my docker data folder to an external SD card?

Cannot uninstall docker

I am trying to uninstall docker
The command I am using is:
sudo apt-get purge -y docker-engine docker docker.io docker-ce docker-ce-cli
The error I get:
E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/nvidia-docker.list
E: The list of sources could not be read.
E: Type '<!DOCTYPE' is not known on line 1 in source list /etc/apt/sources.list.d/nvidia-docker.list
E: The list of sources could not be read.
I have uninstalled docker before but never ran into this. Does anyone know what this means?
I am using Ubuntu 20.04
Looks like /etc/apt/sources.list.d/nvidia-docker.list is corrupt.
Try manually deleting it, and then running the apt command again.
You're removing docker, so definitely won't need this entry any more

How to install standard system commands for amazon-linux 2

I seem to be missing some very basic utilities, namely the commands sudo and which seem to be missing. How can I install these, or even better is there an ami linux image which has all of these kind of things pre-installed.
Dockerfile:
FROM amazonlinux:2.0.20190823.1-with-sources
RUN echo $(which sudo)
Error:
/bin/sh: which: command not found
Or if I just try to use something like sudo yum
/bin/sh: sudo: command not found
Since it seems relevant, I also don't seem to have root permissions as trying to use the adduser command gives me a non zero response code of 2.
RUN yum update && yum install -y sudo, sudo is not installed in that image by default. you are already root in that images so you do not need sudo yum.
the idea from not installing too many packages by default ,is to let the image as small as possible and let the user install just what he needs

Yum install / update not working inside docker images but working otherwise from the centos machine

I am able to yum install, or yum update from the server, but when trying to do same (as specified in the Dockerfile) inside a docker container, it fails stating the following common error :
One of the configured repositories failed (Unknown),
and yum doesn't have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=<repoid> ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable <repoid>
or
subscription-manager repos --disable=<repoid>
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true
Cannot find a valid baseurl for repo: base/7/x86_64
my Docker file is a simple :
FROM centos:centos7
RUN echo "nameserver 8.8.8.8" > /etc/resolv.conf
RUN echo "nameserver 8.8.4.4" >> /etc/resolv.conf
RUN yum -y update; yum clean all
RUN yum -y install epel-release; yum clean all
RUN yum -y install python-pip; yum clean all
I have tried various things like adding ip_resolve=4 in /etc/yum.conf, or addinf 8.8.8.8 and 4.4.4.4 to /etc/resolv.conf and other methods, in vain.
here's the docker info :
Containers: 28
Running: 0
Paused: 0
Stopped: 28
Images: 144
Server Version: 1.13.0
docker-compose version 1.10.1, build b252738
docker-py version: 2.0.2
CPython version: 2.7.5
OpenSSL version: OpenSSL 1.0.1e-fips 11 Feb 2013
Please help. I am only running things under a VPN, no proxy.
machine is an AMI : 3.10.0-514.el7.x86_64.
Need I add it's IP anywhere insde docker container? Please help.
TIA!

MediaWiki Scribunto Lua error: Internal error: The interpreter exited with status 2

I have done a fresh installation on my local development machine of MediaWiki 1.24.2.
I have installed Scribunto and checked it is installed correctly on the list of extensions.
I'm getting an error when I try and create an InfoBox. The error is:
Lua error: Internal error: The interpreter exited with status 2
These are the steps I have taken the following steps to try and fix this.
I have been to the Mediawiki Scribunto page
I have added these lines to my LocalSettings.php file:
$wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
$wgMaxShellMemory = 204800; # in KB
This has not fixed things. I'm a but confused as to how to switch on error logging. The help page just says:
Assigning a file path to $wgScribuntoEngineConf['luastandalone']['errorFile'] and examining that output can be valuable in diagnosing memory allocation errors.
How do I assign a file path? - Solved Thanks for the help with this.
I enclose a [link][2] to my php.ini file and my LocalSettings.php file (Zipped together)
UPDATE - I have now managed to add a log file and the error in the log file is:
/var/www/extensions/Scribunto/engines/LuaStandalone/binaries/lua5_1_5_linux_32_generic/lua: Syntax error: "(" unexpected
UPDATE TWO
These are the full steps I take to replicate the error:
Start by checking for any package updates available and installing them
sudo apt-get update
sudo apt-get upgrade
Now install Apache, PHP and MySQL
sudo apt-get install apache2 -y
sudo apt-get install php5 libapache2-mod-php5 -y
sudo apt-get install mysql-server php5-mysql -y
sudo apt-get install php-apc php5-intl imagemagick
sudo apt-get install phpmyadmin
We can check the internal IP address of our Raspberry Pi with the following command (Make a note of it)
hostname -I
We can now create a database for our new MediaWIki installation. Start by logging in as root using the password you created earlier
mysql -u root -p
Here we are adding database=mediawikidb user=mediawikiuser and password=mediawikipassword:
CREATE DATABASE mediawikidb;
CREATE USER mediawikiuser#localhost IDENTIFIED BY 'mediawikipassword';
GRANT index, create, select, insert, update, delete, alter, lock tables on mediawikidb.* TO mediawikiuser#localhost;
Now we can make some changes to php.ini so we can increase the maximum file size and memory limit
cd /etc/php5/apache2/
nano php.ini
Replace 'upload_max_filesize = 2M' with 'upload_max_filesize = 64M'
Replace 'post_max_size = 8M' with 'post_max_size = 64M'
Save the file
Now we are going to empty the /var/www folder and change its ownership to pi
cd /var/www
sudo chown pi: .
sudo rm *
Now we can download MediaWiki, uncompress it and copy it into /var/www
mkdir /var/www/mediawiki
wget http://releases.wikimedia.org/mediawiki/1.24/mediawiki-1.24.2.tar.gz
tar -xvzf mediawiki-*.tar.gz
sudo mv mediawiki-*/* /var/www/
Now we can restart the relevant services
sudo service apache2 restart
sudo service mysql restart
Now open a browser and go to localhost and start the installation
To Complete Installation copy LocalSettings.php to /var/www/mediawiki
Now install Scribunto
Download from http://www.mediawiki.org/wiki/Special:ExtensionDistributor/Scribunto
tar -xzf Scribunto-REL1_24-b060fbd.tar.gz -C /var/www/mediawiki/extensions
sudo nano /etc/mediawiki/LocalSettings.php
add these lines at the end of the file and save
require_once "$IP/extensions/Scribunto/Scribunto.php";
$wgScribuntoDefaultEngine = 'luastandalone';
$wgScribuntoEngineConf['luastandalone']['memoryLimit'] = 209715200; # bytes
$wgMaxShellMemory = 204800; # in KB
$wgScribuntoEngineConf['luastandalone']['errorFile'] = '/var/tmp/luaerror.log';
chmod -R 777 /var/www/mediawiki/extentions/Scribunto/engines/LuaStandalone/
Now visit 'http://en.wikipedia.org/wiki/Special:Export' and enter Template:Infobox in the big box. Tick all three boxes and click Export
Open the file in Notepad or similar and do a find and replace text/plain with CONTENT_FORMAT_TEXT
Login to MediaWiki and go to Special:Import
Once everything has imported correctly go to the homepage and enter this at the top of the page:
{{Infobox
|title = test Infobox
|header1 = Main Heading
|header2 = First set of data
|label2 = Label
|data2 = Data
|header3 = Remove this line (optional)
|label3 = More Label
|data3 = More data
}}
Many thanks
Finally fixed. I did:
sudo apt-get install lua
Then added the following to my LocalSettings.php
$wgScribuntoEngineConf['luastandalone']['luaPath'] = '/usr/bin/lua5.1';
I assume the lua binary included with Scribunto is not ok with the Raspberry Pi?

Resources