UPWORK/ODESK guru: Tips and Tricks for clients

skype: upwork.link , email: info@upwork.link

Archive for the ‘Tips and Tricks’ Category

VIRSH:KVM – Перемещение дисков в другое хранилище

without comments

Migration of disks around is part of the life cycle of a guest. Disks in the storage pools (local or network) may fail or fill up due to bad capacity management. Ordinarily, one would have to shut down the guest, copy the storage volume file elsewhere (if it is a file), wait, update xML configuration, and launch it again. However, in mission-critical enterprises, this may not always be possible.

To get the source path, need check XML configuration file or storage volume. This requires to know which storage pool in use.

Read the rest of this entry »

Written by spectre

February 11th, 2018 at 4:46 pm

LUKS / dm-crypt and FS images

without comments

LUKS / dm-crypt is also suitable for creating FS images that can be used to store important information:
Read the rest of this entry »

Written by spectre

February 4th, 2018 at 7:25 pm

Posted in Tips and Tricks

Running certbot – disable auto upgrade.

without comments

certbot-auto всегда будет пытаться извлечь самую новую версию из самой последней версии. Если вы хотите, чтобы он был заблокирован на определенную версию и не получал автоматических обновлений, запустите его с помощью флага

1
2
3
4
5
6
7
8
9
10
# scripts/letsencrypt/certbot-auto --no-self-upgrade
...
Saving debug log to /var/log/letsencrypt/letsencrypt.log

How would you like to authenticate and install certificates?
-------------------------------------------------------------------------------
1: Apache Web Server plugin - Beta (apache)
2: Nginx Web Server plugin - Alpha (nginx)
-------------------------------------------------------------------------------
Select the appropriate number [1-2] then [enter] (press 'c' to cancel):

Written by spectre

December 11th, 2017 at 9:38 pm

Posted in Tips and Tricks

BASH: сохраняем историю со всех терминалов

without comments

Меня давно раздражает поведение файла истории Баша. Если вы используете несколько терминалов, вся история теряется, за исключением закрытия последнего терминала. Правильное поведение должно состоять в том, чтобы сохранить всю историю со всех терминалов! Легкий способ сделать это – просто сохранить команды в файле истории в реальном времени. Благодаря Linux Commando я знаю, как это сделать. Вот секрет:

1
2
shopt -s histappend
PROMPT_COMMAND = "history -a; $ PROMPT_COMMAND"

Поместите эти строки в ваш bash_profile или bashrc. Первая строка говорит bash добавить к истории вместо полной перезаписи. Вторая строка вызывает историю – каждый раз, когда отображается приглашение, которое по существу добавляет последнюю команду в файл истории.

Written by spectre

November 27th, 2017 at 1:42 pm

Posted in Bash,Tips and Tricks

Openstack Horizon: Bug of ‘FileField need clean up temp file….’ or how to remove supefluos files in Horizon/Django after uploading..

without comments

After few day envestigation code I created patch. I hope core developers can use it in horizon …

1
2
3
4
5
6
7
8
9
10
11
12
13
14
234 @@ -442,7 +442,12 @@
235                                      {'data': data})
236          else:
237              def upload():
238 -                return glanceclient(request).images.upload(image.id, data)
239 +                glance_answer = glanceclient(request).images.upload(image.id, data)
240 +                if isinstance(data, TemporaryUploadedFile):
241 +                   if glance_answer[0].ok is True :
242 +                      data.file.close_called = False
243 +                      data.file.close()
244 +                return glance_answer
245              thread.start_new_thread(upload, ())
246
247      return Image(image)

Enjoy! Free!

Written by spectre

November 19th, 2017 at 5:16 pm

Posted in Tips and Tricks

BUGS of OPENSTACK: broken dependency of version of openstack-novaclient in tarballs of horizon-9.1.2

without comments

WRONG!!!

1
2
3
(.venv) [homitaka@tayn1 horizon]$ egrep novaclient requirements.txt
python-novaclient!=2.33.0,>=2.29.0 # Apache-2.0
(.venv) [homitaka@tayn1 horizon]$

Read the rest of this entry »

Written by spectre

May 15th, 2017 at 9:29 pm

Posted in Tips and Tricks

Deploy Horizon (any releases) from tarballs with Apache for isolated user in virtual environment.

without comments

If your company use OpenStack clouds without ‘Horizon Dashboard’ interface, you may wish to deploy your own horizon instance. Or you can use this method for permanent deploy any version of Horizont in your clouds.

However, your concern is that http might be insecure… especially if hosted on a VM or machine accessible from the Internet. So you want an SSL connection. It is will be in next parts of articles

ref: https://docs.openstack.org/developer/horizon/topics/install.html

Read the rest of this entry »

Written by spectre

May 15th, 2017 at 1:01 am

Posted in Tips and Tricks

Protected: Apache 2.4 and compilation mod_wsgi for alternative python version.

without comments

This content is password protected. To view it please enter your password below:

Written by spectre

March 2nd, 2017 at 3:33 pm

Posted in Tips and Tricks

Linux – configuring multicast – via C application.

without comments

Configuring the Kernel for multicast

ref: http://www.linuxjournal.com/article/3041

To use multicast, the kernel configuration requires the CONFIG_IP_MULTICAST option to be set.
Use ifconfig to enable and disable all-multicast mode. Disable promisc by running:

Read the rest of this entry »

Written by spectre

May 21st, 2016 at 2:26 pm

Posted in Tips and Tricks

CSF: IP tracking of DNS name – perl tool

without comments

Simple code on perl for tracking of list of IP of DNS name:

Read the rest of this entry »

Written by spectre

July 21st, 2015 at 4:13 pm

Posted in Tips and Tricks