<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-6855909399292968376</id><updated>2026-10-15T18:52:59.585+09:00</updated><category term="linux"/><category term="archlinux"/><category term="Python"/><category term="openstack"/><category term="PXE"/><category term="RHEL"/><category term="bash"/><category term="fedora"/><category term="translation"/><category term="ubuntu"/><category term="brain workshop"/><category term="code"/><category term="security"/><category term="android"/><category term="debian"/><category term="virtualbox"/><category term="GNU Screen"/><category term="mnemosyne"/><category term="Beeminder"/><category term="Korea"/><category term="OmegaT"/><category term="firewalld"/><category term="ibus"/><category term="ibus-hangul"/><category term="packstack"/><category term="systemd"/><category term="CentOS"/><category term="Dropbox"/><category term="Emacs"/><category term="UTF-8"/><category term="adb"/><category term="darkhttpd"/><category term="dnsmasq"/><category term="docker"/><category term="uefi"/><category term="ATCA"/><category term="Canon"/><category term="GCJ"/><category term="H610"/><category term="Huion"/><category term="JS"/><category term="KLTI"/><category term="Korean"/><category term="LFCS"/><category term="Latitude D630"/><category term="Linux Foundation"/><category term="MG2490"/><category term="OCR"/><category term="Project Euler"/><category term="RescueTime"/><category term="X11"/><category term="asus"/><category term="awk"/><category term="daum"/><category term="git"/><category term="iconv"/><category term="imagemagick"/><category term="irssi"/><category term="kvm"/><category term="loopback"/><category term="manageiq"/><category term="modernie"/><category term="motion"/><category term="mysql"/><category term="npm"/><category term="ntpd"/><category term="nvidia"/><category term="oncontextmenu"/><category term="pixma"/><category term="pyglet"/><category term="qemu"/><category term="serial console"/><category term="ssh"/><category term="symlink"/><category term="漢字"/><category term="BeautifulSoup"/><category term="CAT"/><category term="CINT"/><category term="CP949"/><category term="CUPS"/><category term="Digital Ocean"/><category term="Dr. Seuss"/><category term="EFI"/><category term="EUC-KR"/><category term="GCP"/><category term="Greasemonkey"/><category term="HP iLO"/><category term="HackerRank"/><category term="Helium"/><category term="Hydrogen"/><category term="IE"/><category term="IFTTT"/><category term="LaTeX"/><category term="LiveUSB"/><category term="NetworkManager"/><category term="ODL"/><category term="OpenDaylight"/><category term="REPL"/><category term="REST API"/><category term="ROOT"/><category term="Redhat"/><category term="SAN"/><category term="SDN"/><category term="SSD"/><category term="Samsung"/><category term="Terminator"/><category term="VCS"/><category term="WinXP"/><category term="activex"/><category term="adobe"/><category term="bridge"/><category term="cinder"/><category term="cloud"/><category term="convmv"/><category term="couchdb"/><category term="cs50x"/><category term="drawing tablet"/><category term="drivers"/><category term="edx"/><category term="emulation"/><category term="excuses"/><category term="finance"/><category term="flash"/><category term="gdb"/><category term="github"/><category term="intel_backlight"/><category term="ipTIME"/><category term="iproute2"/><category term="irc"/><category term="javascript"/><category term="kernel 3.14"/><category term="libreoffice"/><category term="libvirt"/><category term="logging"/><category term="make"/><category term="mame"/><category term="mariadb"/><category term="meditation"/><category term="mitaka"/><category term="multipath"/><category term="naver"/><category term="net-tools"/><category term="netcat"/><category term="nmap"/><category term="ntp"/><category term="openflow"/><category term="pomodoro"/><category term="procrastination"/><category term="productivity"/><category term="proliant"/><category term="public domain"/><category term="qmc2"/><category term="racket"/><category term="rooting"/><category term="router"/><category term="rpm"/><category term="sane"/><category term="scanner"/><category term="selinux"/><category term="sheepdog"/><category term="stickk"/><category term="storage"/><category term="tty"/><category term="ufw"/><category term="vim"/><category term="vsftpd"/><category term="xfce4-terminal"/><title type='text'>Jun&#39;s Pocket Plane</title><subtitle type='html'>고추먹고 맴맴</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default?start-index=26&amp;max-results=25&amp;redirect=false'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>160</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-2361591807850601144</id><published>2017-11-06T21:31:00.002+09:00</published><updated>2017-11-06T21:34:59.622+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archlinux"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><category scheme="http://www.blogger.com/atom/ns#" term="vim"/><title type='text'>Setting up vim syntastic on various linux distros</title><content type='html'>I use several different notebooks at home and at work that have different Linux distros installed, namely, Archlinux, Ubuntu 16.04 and Fedora 26. As a systems engineer, using vi/vim is a necessity as it is installed by default on every *nix machine even if no other editor is available. While I prefer Emacs with Flycheck when programming, I use vim extensively day-to-day to edit shell scripts, yaml files, and other structured text. During this work a syntax-checker is very helpful for catching errors. For this I use the vim plugin syntastic.&lt;br /&gt;
&lt;br /&gt;
Syntastic provides vim with linter/syntax-checking integration for various programming languages and markup formats. While it doesn&#39;t work on-the-fly like the syntax checkers in traditional IDE&#39;s or Emac&#39;s Flycheck, it does check syntax every time a file is saved with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;:w&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Recent versions of vim have a native plugin manager enabled by default. Vim plugin files installed through your package manager (&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pacman&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;apt-get&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dnf&lt;/span&gt; / &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;yum&lt;/span&gt;) are usually written to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/usr/share/vim/vimfiles/plugin/&lt;/span&gt; but you can also set the plugin directory to a location under ~/.vim if you add it to your runtimepath. You can check the current setting of your &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;runtimepath&lt;/span&gt; (rtp) in vim by entering:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;color: blue; font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;: set rtp&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;runtimepath=~/.vim,/usr/share/vim/vimfiles,/usr/share/vim/vim80,/usr/share/vim/vimfiles/aft&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;er,~/.vim/after,/usr/share/vim/vimfiles/plugin/&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Press ENTER or type command to continue&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
To enable the default vim plugin manager, edit&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;~/.vimrc&lt;/span&gt;&amp;nbsp;and add the following directory to your default run time path:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;set rtp+=/usr/share/vim/vimfiles&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note that on Fedora, in addition to installing the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vim-syntastic&lt;/span&gt; package, you also have to install a package for each language or DSL you want to use with syntastic; i.e. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vim-syntastic-python&lt;/span&gt; for Python 2 and 3 linting, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vim-syntastic-sh&lt;/span&gt; for shellcheck integration, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vim-syntastic-ansible&lt;/span&gt; for checking ansible yaml files and playbooks, etc.&lt;br /&gt;
&lt;br /&gt;
On Archlinux, instead of setting &lt;i&gt;rtp&lt;/i&gt;, you need to specify &quot;packpath&quot; in your &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.vimrc&lt;/span&gt; as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;set packpath=/usr/share/vim/vimfiles/plugin/&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you create a &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;~/.vim&lt;/span&gt; directory (where you should place manually downloaded or git-cloned plugins), vim will also check this path as part of &lt;i&gt;rtp&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
You can see my personal .vimrc from my dotfiles repo at the link below:&lt;br /&gt;
&lt;a href=&quot;https://github.com/gojun077/jun-dotfiles/blob/master/vimrc&quot;&gt;https://github.com/gojun077/jun-dotfiles/blob/master/vimrc&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of vim&amp;nbsp;+ syntastic with shellcheck output for a Bash shell script:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtWhdY-mkHiqihzYLTsBanuTJuEU3XePuFgd2lIieL-Pw-bMs6pttTxq38ZI-eyqXxxR1UNupdpITwyrO-SC9Zdac1dKRRJ1m44EzPyX_KWStN9XAtiMJHfPe1ijRI-vnqELUdQ5j3A/s1600/vim_syntastic_shellcheck.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; data-original-height=&quot;759&quot; data-original-width=&quot;862&quot; height=&quot;562&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtWhdY-mkHiqihzYLTsBanuTJuEU3XePuFgd2lIieL-Pw-bMs6pttTxq38ZI-eyqXxxR1UNupdpITwyrO-SC9Zdac1dKRRJ1m44EzPyX_KWStN9XAtiMJHfPe1ijRI-vnqELUdQ5j3A/s640/vim_syntastic_shellcheck.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/vim-syntastic/syntastic#installation&quot;&gt;https://github.com/vim-syntastic/syntastic#installation&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/2361591807850601144/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/11/setting-up-vim-syntastic-on-various.html#comment-form' title='7개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2361591807850601144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2361591807850601144'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/11/setting-up-vim-syntastic-on-various.html' title='Setting up vim syntastic on various linux distros'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhKtWhdY-mkHiqihzYLTsBanuTJuEU3XePuFgd2lIieL-Pw-bMs6pttTxq38ZI-eyqXxxR1UNupdpITwyrO-SC9Zdac1dKRRJ1m44EzPyX_KWStN9XAtiMJHfPe1ijRI-vnqELUdQ5j3A/s72-c/vim_syntastic_shellcheck.png" height="72" width="72"/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-2982687911810768320</id><published>2017-10-26T13:59:00.000+09:00</published><updated>2017-10-26T14:00:28.534+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><category scheme="http://www.blogger.com/atom/ns#" term="packstack"/><title type='text'>Set Keystone v3 API endpoints in Packstack Newton</title><content type='html'>The dev team at my current workplace has created an app which integrates with Openstack Newton however they only use the Keystone v3 API. I deployed Newton using the centos 7 release version from the repo enabled by the&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;centos-release-openstack-newton&lt;/span&gt; package from EPEL. I deployed two nodes, one controller and one compute on top of CentOS 7.4&lt;br /&gt;
&lt;br /&gt;
As recently as Openstack Mitaka, packstack &lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=1330289&quot;&gt;deployment using Keystone v3 API failed&lt;/a&gt; when running the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder.pp&lt;/span&gt; puppet manifest but this issue has been fixed in RDO Openstack Newton packstack deployment. To enable Keystone v3 API, simply edit the following in your packstack answer file:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CONFIG_KEYSTONE_API_VERSION=v3&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Then run packstack with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;packstack --answer-file &lt;your answer=&quot;&quot; file=&quot;&quot;&gt;&lt;/your&gt;&lt;/span&gt; and the installation will complete successfully.&lt;br /&gt;
&lt;br /&gt;
However, if you go into the Horizon dashboard Admin -&amp;gt; System Info menu, you will see that the Keystone endpoints are still set to v2.0. You can also verify this from the openstack commandline (make sure you have &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;python-openstackclient&lt;/span&gt; package installed):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@newtonctrl ~(keystone_admin)]# openstack endpoint list&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;+----------------------------------+-----------+--------------+----------------+---------+-----------+-------------------------------------------------+&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| ID&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| Region&amp;nbsp; &amp;nbsp; | Service Name | Service Type&amp;nbsp; &amp;nbsp;| Enabled | Interface | URL&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;+----------------------------------+-----------+--------------+----------------+---------+-----------+-------------------------------------------------+&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| 1ed930a5fad64fdb93cab8c5647a8bbe | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | internal&amp;nbsp; | http://172.16.11.201:5000/&lt;b&gt;v2.0&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| 403c6f321b364dde821c6057fc81fca4 | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | public&amp;nbsp; &amp;nbsp; | http://172.16.11.201:5000/&lt;b&gt;v2.0&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| b412ae6f0b0446dcac3d75e68a30803e | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | admin&amp;nbsp; &amp;nbsp; &amp;nbsp;| http://172.16.11.201:35357/&lt;b&gt;v2.0&lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this situation, if you make a curl request to the above endpoints but replace v2.0 with v3, the token payload will still contain Keystone v2.0 endpoints (it simply redirects v3 requests to v2.0). Keystone will still respond on the v3 endpoint, but the payload will use v2.0 formatting. This can be a problem for apps which expect a JSON dump using v3 fields and formats. Therefore I had to manually change the Keystone endpoints to v3.&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;In Openstack Newton you can create(delete), and enable(disable) endpoints using the &quot;&lt;i&gt;openstack endpoint create(delete)&lt;/i&gt;&quot; and &quot;&lt;i&gt;openstack endpoint set --enable(disable) UUID&lt;/i&gt;&quot; commands.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Create Keystone v3 API endpoints&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@newtonctrl ~(keystone_admin)]#&amp;nbsp;openstack endpoint create identity --region RegionOne public http://172.16.11.201:5000/v3&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Repeat this for each service type (i.e. internal, admin, and public).&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Disable Keystone v2.0 API endpoints&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@newtonctrl ~(keystone_admin)]#&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;openstack endpoint set --disable&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;1ed930a5fad64fdb93cab8c5647a8bbe&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Repeat this for each Keystone v2.0 API endpoint UUID.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@newtonctrl ~(keystone_admin)]# openstack endpoint list | grep keystone&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| 1ed930a5fad64fdb93cab8c5647a8bbe | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| False&amp;nbsp; &amp;nbsp;| internal&amp;nbsp; | http://172.16.11.201:5000/v2.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| 403c6f321b364dde821c6057fc81fca4 | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| False&amp;nbsp; &amp;nbsp;| public&amp;nbsp; &amp;nbsp; | http://172.16.11.201:5000/v2.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| 7cf272994522455790d7dd5a0420b150 | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | internal&amp;nbsp; | http://172.16.11.201:5000/v3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| ab64142376ae4aa68e832479295ed301 | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | public&amp;nbsp; &amp;nbsp; | http://172.16.11.201:5000/v3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| b412ae6f0b0446dcac3d75e68a30803e | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| False&amp;nbsp; &amp;nbsp;| admin&amp;nbsp; &amp;nbsp; &amp;nbsp;| http://172.16.11.201:35357/v2.0&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;|&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;| e6891754ac154db1b8e32d7f5d67578a | RegionOne | keystone&amp;nbsp; &amp;nbsp; &amp;nbsp;| identity&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;| True&amp;nbsp; &amp;nbsp; | admin&amp;nbsp; &amp;nbsp; &amp;nbsp;| http://172.16.11.201:5000/v3&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
You can see that the v2.0 Keystone API endpoints are set to &lt;i&gt;False&lt;/i&gt; in the &quot;Enabled&quot; field, while the v3 endpoints are set to &lt;i&gt;True&lt;/i&gt; for the same field. If this is not reflected in the Horizon UI, you may have to erase your web browser cache and reload the page. I&#39;m not sure if this issue has been fixed in RDO Ocata, but I plan to file a bug report on Red Hat Bugzilla.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/2982687911810768320/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/10/set-keystone-v3-api-endpoints-in.html#comment-form' title='6개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2982687911810768320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2982687911810768320'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/10/set-keystone-v3-api-endpoints-in.html' title='Set Keystone v3 API endpoints in Packstack Newton'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-8853647305164699431</id><published>2017-07-29T09:56:00.002+09:00</published><updated>2017-07-29T09:56:20.309+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Customizing User-Agent string when using curl or Python requests</title><content type='html'>The Linux tool &lt;i&gt;cURL&lt;/i&gt; and the Python &lt;i&gt;requests&lt;/i&gt; library can both be used to submit GET requests to REST API endpoints. On some sites, however, you will get 403 Forbidden or 401 Unauthorized errors unless you change your User-Agent string to something other than &quot;curl&quot; and &quot;python requests&quot;. As of July 2017, I have had good results by changing my User-Agent string to &quot;Mozilla/5.0&quot;.&lt;br /&gt;
&lt;br /&gt;
For &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;curl&lt;/span&gt;, the option to change the user agent string is &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;-A&lt;/span&gt; or &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;--user-agent&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
For Python requests, you can add the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;user-agent&lt;/span&gt; string to the headers argument in your get request:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;response = requests.get(&quot;https://api.coinone.co.kr/orderbook?currency=eth&quot;, headers={&#39;User-Agent&#39;: &#39;Mozilla/5.0})&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/8853647305164699431/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/07/customizing-user-agent-string-when.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8853647305164699431'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8853647305164699431'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/07/customizing-user-agent-string-when.html' title='Customizing User-Agent string when using curl or Python requests'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-109028244612513105</id><published>2017-07-15T09:46:00.000+09:00</published><updated>2017-07-17T11:11:12.925+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="OmegaT"/><category scheme="http://www.blogger.com/atom/ns#" term="translation"/><title type='text'>OmegaT 4.1.1 settings for MS Translator under MS Azure</title><content type='html'>MS Translator used to be available through the Azure Apps Marketplace, but after April 2017 MS Translator is offered as part of Microsoft&#39;s Cognitive Services API.&lt;br /&gt;
&lt;br /&gt;
In the past, using OmegaT with MS Translator required you to specify a client id and client secret. The corresponding variables are:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;microsoft.api.client_id&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;microsoft.api.client_secret&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
With the move to MS Cognitive Services, &lt;a href=&quot;https://sourceforge.net/p/omegat/feature-requests/1280/&quot;&gt;OmegaT has a new variable&lt;/a&gt; which must be passed to the MS Translator API:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;microsoft.api.subscription_key&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
From the Azure Dashboard, select your MS Translator app and then select &lt;i&gt;Keys&lt;/i&gt;. You will see your app name and two keys. You must enter one of these keys into the variable&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;microsoft.api.subscription&lt;/span&gt;_key for OmegaT to authenticate with MS Translator.&lt;br /&gt;
&lt;br /&gt;
Here is my OmegaT 4.1.1 launch script on Linux:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Launch Script for OmegaT CAT tool&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# GOOGTRANS and MSTRANS represent the API&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# keys for Google Translate API v2 and&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Microsoft Translator, respectively&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;#&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Last Updated: 2017-07-11&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Jun Go gojun077@gmail.com&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GOOGTRANS=$(&amp;lt;&quot;$HOME/SpiderOak Hive/keys/googleTranslateAPIkey.pw&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;MSTRANS=$(&amp;lt;&quot;$HOME/SpiderOak Hive/keys/microsoftTranslatorAPIkey.pw&quot;)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;OTPATH=$HOME/omegat&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;XMODIFIERS=@im=ibus java -jar -Xmx512M -Dgoogle.api.key=&quot;$GOOGTRANS&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Dmicrosoft.api.subscription_key=&quot;$MSTRANS&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Dmicrosoft.api.client_id=&quot;name_of_your_app&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Dmicrosoft.api.client_secret=&quot;$MSTRANS&quot; \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -Dswing.crossplatformlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &quot;$OTPATH&quot;/OmegaT.jar&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References&lt;/b&gt;:&lt;br /&gt;
https://sourceforge.net/p/omegat/svn/9562/tree//trunk/src/org/omegat/Bundle.properties?barediff=5161c5ece88f3d0a5207336e:9561&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/109028244612513105/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/07/omegat-411-settings-for-ms-translator.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/109028244612513105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/109028244612513105'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/07/omegat-411-settings-for-ms-translator.html' title='OmegaT 4.1.1 settings for MS Translator under MS Azure'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-6390028948922576592</id><published>2017-05-06T09:54:00.003+09:00</published><updated>2017-05-06T09:54:29.455+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><category scheme="http://www.blogger.com/atom/ns#" term="RHEL"/><category scheme="http://www.blogger.com/atom/ns#" term="selinux"/><category scheme="http://www.blogger.com/atom/ns#" term="systemd"/><title type='text'>RHEL 7.X DBus.Error.AccessDenied caused by permissions problem on root partition</title><content type='html'>At a client site, I have 6 nodes running Openstack Mitaka on top of RHEL 7.2. After rebooting one node, however, the networking configs in /etc/sysconfig/network-scripts were not being loaded (specifically, the OVS bridges necessary for Openstack to run, i.e. &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;br-ex&lt;/span&gt;, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;br-int&lt;/span&gt;). When I attempted to manually load the network settings with&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;systemctl start network&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I was told that the systemd unit file &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;network.service&lt;/span&gt; does not exist! This file is normally generated automatically by &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;systemd-sysv-generator&lt;/span&gt;&amp;nbsp;at boot from legacy SystemV scripts in &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/init.d/&lt;/span&gt; and written to &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/run/systemd/generator.late/network&lt;/span&gt;, but for some reason this was not happening.&lt;br /&gt;
&lt;br /&gt;
Because RHEL 7.2 was not reading my network config files, I decided to manually create the OVS bridges using the following commands:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ovs-vsctl add-br br-ex&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ip link set br-ex up&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ovs-vsctl add-port br-ex eno1&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To use OpenVSwitch, however, the systemd&#39;s openvswitch.service must be running. When I tried to invoke the service using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;systemctl start openvswitch&lt;/span&gt;, I got the following error:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DBus.Error.AccessDenied: An SELinux policy prevents this sender from sending this message to this recipient&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Also the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;journalctl&lt;/span&gt; log showed tons of auditd errors that continued to print every 3 seconds or so.&lt;br /&gt;
&lt;br /&gt;
It turns out that this is a permissions problem on &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/&lt;/span&gt;! According to Redhat, the proper permissions on the root partition is 555, or r-x r-x r-x. After changing the permissions and rebooting, I no longer get the&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;DBus.Error.AccessDenied&lt;/span&gt; error message. I don&#39;t know why the perm&#39;s on / have to be set as 555 (on a personal Archlinux installation without SELINUX, the perms on / are 755&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rwx r-x r-x&lt;/span&gt;). Furthermore I don&#39;t know how the perms got changed to 555. I checked the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;history&lt;/span&gt; log on the affected nodes and there is no record of anyone changing permissions on the root partition.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
https://access.redhat.com/solutions/1990203 (you must register in order to access this Knowledge Base solution)&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/6390028948922576592/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/05/rhel-7x-dbuserroraccessdenied-caused-by.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6390028948922576592'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6390028948922576592'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/05/rhel-7x-dbuserroraccessdenied-caused-by.html' title='RHEL 7.X DBus.Error.AccessDenied caused by permissions problem on root partition'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-8954787579822535366</id><published>2017-03-11T10:02:00.001+09:00</published><updated>2017-03-11T10:02:19.968+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Generate /etc/shadow PW hash from the cli using python2 and 3</title><content type='html'>In /etc/shadow, hashed and salted passwords are stored together with the user name as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;myuser:$6[someSaltedHash]:...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
where the number following the $ can take the values 1~6 corresponding to the following hash algorithms:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;1 &amp;nbsp; &amp;nbsp;md5&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2a &amp;nbsp; Blowfish&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;2y &amp;nbsp; Blowfish with correct 8-bit char handling&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;5 &amp;nbsp; &amp;nbsp;sha-256&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;6 &amp;nbsp; &amp;nbsp;sha-512&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Many How-to&#39;s on the Internet recommend using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mkpasswd&lt;/span&gt; from the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;expect&lt;/span&gt; package, but I find it is much easier to use python2 or python3 to generate the salted hash.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Python 2:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;python -c &#39;import crypt,getpass; print crypt.crypt(getpass.getpass())&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You will then be prompted to enter your plaintext password after which a /etc/shadow compatible hash will be output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;Python 3:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;python3 -c &#39;import crypt; print(crypt.crypt(&quot;yourpw&quot;, crypt.mksalt(crypt.METHOD_SHA512)))&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In this snippet, you simply enter your plaintext password as an argument and then a /etc/shadow compatible hash will be printed out on the terminal.&lt;br /&gt;
&lt;br /&gt;
You can copy-paste this salted hash into a Kickstart (RHEL and variants) or DI preseed file (Debian and variants) for automated installations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://access.redhat.com/solutions/221403&quot;&gt;https://access.redhat.com/solutions/221403&lt;/a&gt;&amp;nbsp;(requires registration)&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://serverfault.com/questions/330069/how-to-create-an-sha-512-hashed-password-for-shadow&quot;&gt;http://serverfault.com/questions/330069/how-to-create-an-sha-512-hashed-password-for-shadow&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/8954787579822535366/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/03/generate-etcshadow-pw-hash-from-cli.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8954787579822535366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8954787579822535366'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/03/generate-etcshadow-pw-hash-from-cli.html' title='Generate /etc/shadow PW hash from the cli using python2 and 3'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-566594050673084339</id><published>2017-02-25T10:22:00.000+09:00</published><updated>2017-02-25T10:22:17.575+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ibus"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Using ibus in non-GTK/QT apps like Emacs, Java, and Enlightenment/EFL</title><content type='html'>&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus&lt;/span&gt; is a popular Input Method Editor (IME) for Linux which I use for entering Korean and Chinese characters (via &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus-hangul&lt;/span&gt;). ibus has good compatibility with apps using the GTK or QT UI frameworks, but &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus&lt;/span&gt; sometimes behaves strangely in GUI apps that don&#39;t use these frameworks. For example, in Emacs, OmegaT (which uses OpenJDK 7 or 8) and Terminology (a nice terminal that uses the Enlightenment Foundation Libraries), every time I press SPACEBAR after a word, the SPACE character is inserted to the left of the last character. In other words:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&quot;가나다 &quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
appears as&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&quot;가나 다&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To avoid this issue in non-GTK/QT apps on Linux, I launch the ibus daemon as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;env IBUS_ENABLE_SYNC_MODE=0 ibus-daemon -rdx&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can read an explanation of the ibus-daemon option flags in a &lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2014/03/enabling-ibus-support-in-omegat.html&quot;&gt;previous post&lt;/a&gt; from my blog.&lt;br /&gt;
&lt;br /&gt;
Brandon&amp;nbsp;Schaefer&amp;nbsp;@ Canonical, &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/unity/+bug/880876/comments/35&quot;&gt;explains why this error occurs&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote class=&quot;tr_bq&quot;&gt;
The problem seems to be that when IBUS_ENABLE_SYNC_MODE is enabled it pushes all the events through the im engine (such as ibus-hangul) and since it normally only handles Korean text it doesn&#39;t know what to do when, say a space is sent through, so it says it didn&#39;t handle that space event which then IBus handles it and commits that space BEFORE the preedit.&lt;/blockquote&gt;
&lt;br /&gt;
In addition, my &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;.bashrc&lt;/span&gt;&amp;nbsp;contains the following ibus settings:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;##### ibus IME settings #####&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export GTK_IM_MODULE=ibus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export XMODIFIERS=@im=ibus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export QT_IM_MODULE=ibus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export CLUTTER_IM_MODULE=ibus&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;export ECORE_IMF_MODULE=xim&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ECORE_IMF_MODULE&lt;/span&gt; setting is for Enlightenment apps like Terminology terminal.&lt;br /&gt;
&lt;br /&gt;
Once the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus&lt;/span&gt; environment variables are properly set and &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus-daemon&lt;/span&gt; is launched with the appropriate options, you will be able to enter Korean and other Asian text into non-QT/GTK apps with &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ibus&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://github.com/ibus/ibus/issues/1847&quot;&gt;https://github.com/ibus/ibus/issues/1847&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/unity/+bug/880876&quot;&gt;https://bugs.launchpad.net/ubuntu/+source/unity/+bug/880876&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/566594050673084339/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/02/using-ibus-in-non-gtkqt-apps-like-emacs.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/566594050673084339'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/566594050673084339'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/02/using-ibus-in-non-gtkqt-apps-like-emacs.html' title='Using ibus in non-GTK/QT apps like Emacs, Java, and Enlightenment/EFL'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-6790720510905240066</id><published>2017-02-02T16:58:00.000+09:00</published><updated>2017-08-10T10:39:00.568+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="asus"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="ubuntu"/><title type='text'>Fix black screen in tty mode with Ubuntu 16.04.1 on ASUS Prime Z270-K with KabyLake CPU</title><content type='html'>After installing Ubuntu 16.04.1 LTS via USB in UEFI mode, I rebooted and was met by a black screen. From another machine on the local network, I was able to ssh into the newly-installed Ubuntu 16.04.1 box and noticed the following in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dmesg&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000000] Call Trace:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000002] &amp;nbsp;[&lt;ffffffff813f1143&gt;] dump_stack+0x63/0x90&lt;/ffffffff813f1143&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000001] &amp;nbsp;[&lt;ffffffff81081102&gt;] warn_slowpath_common+0x82/0xc0&lt;/ffffffff81081102&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000001] &amp;nbsp;[&lt;ffffffff8108119c&gt;] warn_slowpath_fmt+0x5c/0x80&lt;/ffffffff8108119c&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000014] &amp;nbsp;[&lt;ffffffffc038ec00&gt;] __unclaimed_reg_debug+0x80/0x90 &lt;span style=&quot;background-color: yellow;&quot;&gt;[i915_bpo]&lt;/span&gt;&lt;/ffffffffc038ec00&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000012] &amp;nbsp;[&lt;ffffffffc0394aee&gt;] gen9_read32+0x35e/0x390 &lt;span style=&quot;background-color: yellow;&quot;&gt;[i915_bpo]&lt;/span&gt;&lt;/ffffffffc0394aee&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000002] &amp;nbsp;[&lt;ffffffff8155f5ab&gt;] ? __pm_runtime_resume+0x5b/0x70&lt;/ffffffff8155f5ab&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000016] &amp;nbsp;[&lt;ffffffffc03dead8&gt;] intel_digital_port_connected+0xf8/0x290 &lt;span style=&quot;background-color: yellow;&quot;&gt;[i915_bpo]&lt;/span&gt;&lt;/ffffffffc03dead8&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000013] &amp;nbsp;[&lt;ffffffffc035443b&gt;] ? intel_display_power_get+0x3b/0x50 &lt;span style=&quot;background-color: yellow;&quot;&gt;[i915_bpo]&lt;/span&gt;&lt;/ffffffffc035443b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000015] &amp;nbsp;[&lt;ffffffffc03e70fb&gt;] intel_hdmi_detect+0x4b/0x140 &lt;span style=&quot;background-color: yellow;&quot;&gt;[i915_bpo]&lt;/span&gt;&lt;/ffffffffc03e70fb&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[ &amp;nbsp;+0.000003] &amp;nbsp;[&lt;ffffffffc0173d95&gt;] drm_helper_probe_single_connector_modes_merge_bits+0x235/0x4d0 [drm_kms_helper]&lt;/ffffffffc0173d95&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Google reveals many similar issues with i915 Kernel Mode Setting for Intel integrated video on newer intel CPU&#39;s (Skylake and beyond).&lt;br /&gt;
&lt;br /&gt;
At the GRUB menu after rebooting, I added the kernel boot parameter &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nomodeset&lt;/span&gt; and booted with F10 after which I was able to boot to a visible login prompt now that Linux is no longer trying to automatically set the video resolution.&lt;br /&gt;
&lt;br /&gt;
To make the kernel boot parameter changes permanent in GRUB menu, I had to edit &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/default/grub&lt;/span&gt; and edited the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&quot;nomodeset&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I then ran &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo update-grub&lt;/span&gt; to update &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/grub/grub.cfg&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Some other hardware info:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$ &lt;span style=&quot;color: blue;&quot;&gt;lscpu&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Model name: &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$ &lt;span style=&quot;color: blue;&quot;&gt;dmidecode -t 2&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Base Board Information&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Manufacturer: ASUSTeK COMPUTER INC.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Product Name: PRIME Z270-K&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt; &lt;/span&gt;Version: Rev X.0x&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://askubuntu.com/questions/38780/how-do-i-set-nomodeset-after-ive-already-installed-ubuntu/38782#38782&quot;&gt;http://askubuntu.com/questions/38780/how-do-i-set-nomodeset-after-ive-already-installed-ubuntu/38782#38782&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/6790720510905240066/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/02/fix-black-screen-in-tty-mode-with.html#comment-form' title='6개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6790720510905240066'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6790720510905240066'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/02/fix-black-screen-in-tty-mode-with.html' title='Fix black screen in tty mode with Ubuntu 16.04.1 on ASUS Prime Z270-K with KabyLake CPU'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-1884250931986386142</id><published>2017-01-21T09:56:00.003+09:00</published><updated>2017-01-21T10:20:31.548+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><title type='text'>Migrate from cinder loopback device to physical block device on RDO Mitaka</title><content type='html'>In PoC or test installations of RDO Mitaka via Packstack, by default the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder-volumes&lt;/span&gt; LVM volume group is created in the form of a loopback file/device under /var/lib/cinder/&lt;br /&gt;
&lt;br /&gt;
This might be OK for light testing, but if you plan to use cinder volumes in production you need to create the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder-volumes&lt;/span&gt; VG on a real physical device.&lt;br /&gt;
&lt;br /&gt;
After stopping all openstack services with openstack-service stop I used &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vgs&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;lvs&lt;/span&gt; to take a look at the LVM volume groups and logical volumes on my Openstack storage node (which I separated from the control node using &lt;i&gt;unsupported config&lt;/i&gt; options in my Packstack answer file).&lt;br /&gt;
&lt;br /&gt;
Despite stopping Openstack services, when I tried to use &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;lvchange -ay&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vgchange -ay&lt;/span&gt; to deactivate LV&#39;s in the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder-volumes&lt;/span&gt; VG I kept getting error messages that some logical volumes in the VG were still active.&lt;br /&gt;
&lt;br /&gt;
I finally just used &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;gdisk&lt;/span&gt; to delete the problematic LVM partition housing &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder-volumes&lt;/span&gt;, rebooted and then created a new &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cinder-volumes&lt;/span&gt; VG as detailed in &lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2016/04/use-real-block-storage-backend-for.html&quot;&gt;my previous post&lt;/a&gt; about setting up Cinder to use a physical block device.&lt;br /&gt;
&lt;br /&gt;
However, after restarting Openstack services, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;openstack-cinder-volume.service&lt;/span&gt; failed to start. I examined the systemd service file for &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cinder-volume.service&lt;/span&gt; in &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/usr/lib/systemd/system/&lt;/span&gt; and noticed that it contained the line&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;After = openstack-losetup.service&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It turns out that &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/usr/lib/systemd/system/openstack-losetup.service&lt;/span&gt; sets up a loop device to act as a &quot;disk&quot; for storing the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cinder-volumes&lt;/span&gt; Volume Group. Of course the loop device is just a file and has really bad I/O, so it should only be used for test setups.&lt;br /&gt;
&lt;br /&gt;
I therefore deleted openstack-&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;losetup.service&lt;/span&gt;, removed the ...&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;losetup&lt;/span&gt; line from the systemd config for&amp;nbsp;&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;cinder-volume.service&lt;/span&gt;, and then executed &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;systemctl daemon-reload&lt;/span&gt; to reload all systemd service files.&lt;br /&gt;
&lt;br /&gt;
Now &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;openstack-cinder-volume.service&lt;/span&gt; starts without any errors and doesn&#39;t require a loopback device.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/1884250931986386142/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/01/migrate-from-cinder-loopback-device-to.html#comment-form' title='1개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1884250931986386142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1884250931986386142'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2017/01/migrate-from-cinder-loopback-device-to.html' title='Migrate from cinder loopback device to physical block device on RDO Mitaka'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-1889495786550943452</id><published>2016-12-31T09:53:00.003+09:00</published><updated>2016-12-31T10:40:43.482+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archlinux"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="uefi"/><title type='text'>Kernel boot parameters for grub and bootctl when using sd-encrypt mkinitcpio hook</title><content type='html'>In Archlinux, the initial ramdisk which contains kernel modules needed for booting the system is generated by a bash script named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;a href=&quot;https://wiki.archlinux.org/index.php/mkinitcpio&quot;&gt;mkinitcpio&lt;/a&gt;&lt;/span&gt;. In &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/mkinitcpio.conf&lt;/span&gt;&amp;nbsp;you specify which kernel modules you need at boot and then you build the initrd image (which Archlinux calls&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initramfs-linux.img&lt;/span&gt;) with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio -p linux&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio&lt;/span&gt; will work OOTB for most standard configurations, i.e. root partition in a regular, non-LVM partition, no encrypted partitions, etc. But in my case, I use LVM2 partitions for my root, home, var and other system partitions with only &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/boot&lt;/span&gt; being a regular partition. In addition, these LVM2 partitions are stored inside of a LUKS encrypted container. The &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initramfs-linux.img&lt;/span&gt; created by default &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mkinitcpio&lt;/span&gt; settings cannot handle such things as encrypted partitions and root partitions located inside LVM2 partitions, so you must customize &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio.conf&lt;/span&gt; accordingly.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio.conf&lt;/span&gt; settings for root partition located inside of LVM2 in LUKS (using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt; hook)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Inside &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/mkinitcpio.conf&lt;/span&gt; locate the line starting with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;HOOKS=&lt;/span&gt;&lt;br /&gt;
The default settings as of Dec. 31, 2016 should look something like:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;HOOKS=&quot;base udev autodetect modconf block filesystems keyboard fsck&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You should edit this line so it looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;HOOKS=&quot;base systemd sd-encrypt autodetect modconf block sd-lvm2 filesystems keyboard fsck&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Instead of the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;i&gt;udev&lt;/i&gt;&lt;/span&gt; module, you will use &lt;i&gt;systemd&lt;/i&gt;, and LUKS partitions will be handled by systemd&#39;s &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt; module. Also notice there is a LVM2 kernel module present, but this module is the systemd version &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-lvm2&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
Once you have edited &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio.conf&lt;/span&gt;, generate your initial ramdisk with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mkinitcpio -p linux&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The next step is to add kernel boot options to GRUB (for BIOS machines) or &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;systemd-bootctl&lt;/span&gt; (for UEFI machines).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Kernel boot options for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-lvm2&lt;/span&gt; in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/default/grub&lt;/span&gt; (BIOS)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
If you have an older computer that doesn&#39;t have UEFI firmware but uses BIOS, Archlinux uses GRUB to boot your system. You have to edit &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/etc/default/grub&lt;/span&gt; with the appropriate options for &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sd-encrypt &lt;/span&gt;and then regenerate your grub configuration in &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;/boot/grub/grub.cfg&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Find the line&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&lt;/span&gt; and edit it as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&quot;luks.uuid=72369889-3971-4039-ab17-f4db45aeeef2 root=UUID=f4dbfa30-35ba-4d5e-8d43-a7b29652f575 rw&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note that the &lt;i&gt;luks.uuid&lt;/i&gt; is the UUID for your LUKS encrypted partition BEFORE it has been opened with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cryptsetup open&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can find the UUID for all partitions with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;blkid&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;root=UUID=&lt;/span&gt;&amp;nbsp;refers to the UUID of your root partition which resides inside of a LVM partition which itself is inside of a LUKS encrypted container.&lt;br /&gt;
&lt;br /&gt;
If you haven&#39;t written the GRUB bootloader to your disk yet, you would then execute:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grub-install --recheck /dev/sda&lt;/span&gt;&lt;br /&gt;
(assuming sda is the HDD from which you will boot)&lt;br /&gt;
&lt;br /&gt;
And then (re)generate your &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;grub.cfg&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grub-mkconfig -o /boot/grub/grub.cfg&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Kernel boot options for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt &lt;/span&gt;and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-lvm2&lt;/span&gt; in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/loader/entries/arch.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Archlinux uses &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;systemd-bootctl&lt;/span&gt; as the bootloader for newer machines with UEFI firmware. The main boot menu is located in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/loader/loader.conf&lt;/span&gt; which looks like:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[archjun@gl553rog loader]$ &lt;span style=&quot;color: blue;&quot;&gt;cat loader.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;timeout 5&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;default arch&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This particular menu contains only a single entry, but you can add entries for other Linux distros (&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;systemd-bootctl&lt;/span&gt; can chainload to GRUB) and OS&#39;es like Windows.&lt;br /&gt;
&lt;br /&gt;
The OS-specific config files are stored under &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/loader/entries/&lt;/span&gt;&amp;nbsp;and my arch-specific config is in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/loader/entries/arch.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;title Archlinux&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;linux /vmlinuz-linux&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initrd /intel-ucode.img&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initrd /initramfs-linux.img&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;options luks.uuid=ba04cb93-328c-4f9a-a2a9-4a86cee0f592 luks.name=UUID=ba04cb93-328c-4f9a-a2a9-4a86cee0f592=luks root=/dev/mapper/ARCH-rootvol rw&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;options acpi_osi=! acpi_osi=&quot;Windows 2009&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The kernel boot options appear on the line starting with the keyword &lt;i&gt;options&lt;/i&gt;&lt;br /&gt;
&lt;br /&gt;
For &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;luks.uuid&lt;/span&gt; you need to specify the UUID of your LUKS partition BEFORE it has been opened by &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cryptsetup&lt;/span&gt;. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;luks.name&lt;/span&gt; is not strictly necessary; it simply assigns an easy-to-read name to your LUKS partition. Finally, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;root&lt;/span&gt; specifies which partition your root partition is located on so that the kernel can proceed with booting. For the root parameter, you can specify the partition using /dev/mapper syntax or UUID. If you use UUID you must use the syntax &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;root=UUID=...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
After editing your &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;arch.conf&lt;/span&gt; it is not necessary to rebuild any images or regenerate configs as is the case with GRUB.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Warning: Do not mix up the syntax for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;encrypt&lt;/span&gt; mkinitcpio HOOKS&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Before &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;systemd&lt;/span&gt;&amp;nbsp;became popular, the initial ramdisk for Archlinux used busybox. When booting from an encrypted root and LVM2 with busybox, the mkinitcpio HOOKS used are &lt;i&gt;encrypt&lt;/i&gt; and &lt;i&gt;lvm2&lt;/i&gt; (as opposed to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-lvm2&lt;/span&gt; for systemd)&lt;br /&gt;
&lt;br /&gt;
An &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/mkinitcpio.conf&lt;/span&gt; customized for LUKS and LVM2 (without systemd) would look like:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;HOOKS=&quot;base udev encrypt autodetect modconf block lvm2 filesystems keyboard fsck&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Notice that the &lt;i&gt;encrypt&lt;/i&gt; hook comes just after &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;udev&lt;/span&gt;. If you were using systemd boot, however, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;udev&lt;/span&gt; would be replaced by &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;systemd&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
The related settings in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/default/grub&lt;/span&gt; (BIOS) or &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/boot/loader/entries/arch.conf&lt;/span&gt; (UEFI) would then look something like the following:&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;/etc/default/grub&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;GRUB_CMDLINE_LINUX_DEFAULT=&quot;&lt;span style=&quot;background-color: yellow;&quot;&gt;cryptdevice&lt;/span&gt;=UUID=5a2527d8-8972-43f6-a32d-2c50f734f7a9:ARCH root=/dev/mapper/ARCH-rootvol&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;u&gt;/boot/loader/entries/arch.conf&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;title Arch&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;linux /vmlinuz-linux&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initrd /intel-ucode.img&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initrd /initramfs-linux.img&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;options &lt;span style=&quot;background-color: yellow;&quot;&gt;cryptdevice&lt;/span&gt;=UUID=f121bc44-c8c2-4881-b9d5-da4d1b49f3e4:ARCH root=/dev/mapper/ARCH-rootvol rw&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The keyword &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cryptdevice&lt;/span&gt; will only work with the &lt;i&gt;encrypt&lt;/i&gt; module in your initial ramdisk. If you are using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sd-encrypt&lt;/span&gt;, however, you must replace &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cryptdevice=UUID=&lt;/span&gt; with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;luks.uuid=&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#mkinitcpio&quot;&gt;https://wiki.archlinux.org/index.php/Dm-crypt/System_configuration#mkinitcpio&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/1889495786550943452/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/kernel-boot-parameters-for-grub-and.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1889495786550943452'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1889495786550943452'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/kernel-boot-parameters-for-grub-and.html' title='Kernel boot parameters for grub and bootctl when using sd-encrypt mkinitcpio hook'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-4288470936320751164</id><published>2016-12-17T11:10:00.000+09:00</published><updated>2017-06-28T16:16:27.461+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="Python"/><title type='text'>Mirroring PyPI locally</title><content type='html'>I recently had to set up a local PyPI (Python Package Index) mirror at a client site so that developers could download pip packages locally instead of from the Internet. I used &lt;a href=&quot;https://bitbucket.org/pypa/bandersnatch/overview&quot;&gt;bandersnatch&lt;/a&gt; to mirror the packages hosted on PyPI. Bandersnatch can be installed via pip and mirroring requires just two steps.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Customize &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/bandersnatch.conf&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The first time you run bandersnatch, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;/etc/bandersnatch.conf&lt;/span&gt; will be automatically generated:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;[root@ospctrl1 Documents]# &lt;span style=&quot;color: blue;&quot;&gt;bandersnatch&lt;/span&gt;&lt;br /&gt;2017-06-28 16:05:11,761 WARNING: Config file &#39;/etc/bandersnatch.conf&#39; missing, creating default config.&lt;br /&gt;2017-06-28 16:05:11,761 WARNING: Please review the config file, then run &#39;bandersnatch&#39; again.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this file you will specify the path into which you will download PyPI packages. I set my download path as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[mirror]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;; The directory where the mirror data will be stored.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;directory = /MIRROR/pypi&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
By default, a logfile is specified, but bandersnatch will crash with the error &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;ConfigParser.NoSectionError: No section: &#39;formatters&#39;&lt;/span&gt;&amp;nbsp;if the logfile does not exist. I simply commented out the line to fix this problem:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;;log-config = /etc/bandersnatch-log.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can see a sample &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;bandersnatch.conf&lt;/span&gt; file at this pastebin:&lt;br /&gt;
&lt;a href=&quot;http://paste.openstack.org/show/586323/&quot;&gt;http://paste.openstack.org/show/586323/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Start the mirroring process&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can start mirroring PyPI with the following command:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo bandersnatch mirror&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
As of Oct. 2016, PyPI takes up 380 GB on disk. Although mirroring requires just two steps, you are not done yet. You still have to make the packages available over your network and you must setup pip clients to use your local mirror.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Make the local mirror available over the network&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Once you have mirrored pip packages, the next step is to setup an NFS share to the path where PyPI packages are mirrored or serve the mirror over HTTP using a webserver like Apache, nginx, darkhttpd, etc. I chose to go with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;darkhttpd&lt;/span&gt; because it doesn&#39;t require any setup whatsoever. You simply invoke &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;darkhttpd&lt;/span&gt; in the path you wish to share over http. If you invoke it as &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo&lt;/span&gt;, it will serve files over port 80, but if you invoke it as the regular user, it will serve files over port 8080. You can specify the TCP port used with the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--port&lt;/span&gt; option.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo darkhttpd /MIRROR&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now the Document Root for the webserver is /MIRROR under which the &lt;i&gt;pypi&lt;/i&gt; folder is located. I generally place all my local mirrors (i.e. Ubuntu 16.04 repo, CentOS 7 repo, RHEL repo, etc) under the Document Root so that they are all available over http.&lt;br /&gt;
&lt;br /&gt;
Assuming your local mirror machine has the IP address 10.10.10.5, if you navigate to &lt;i&gt;http://10.10.10.5&lt;/i&gt; in your browser (or with cURL) you should be able to see the &lt;i&gt;pypi&lt;/i&gt; folder.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Customize pip clients to use local PyPI mirror&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
On client machines, create the directory &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;~/.pip&lt;/span&gt;&amp;nbsp;and then create &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;~/.pip/pip.conf&lt;/span&gt;&amp;nbsp;(if it doesn&#39;t exist already). Now add the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[global]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;index-url = http://10.10.10.5/pypi/web/simple&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;trusted-host = 10.10.10.5&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This of course assumes that clients are on the 10.10.10.x subnet and that your PyPI mirror is located on 10.10.10.5&lt;br /&gt;
&lt;br /&gt;
In addition, the web server&#39;s document root should be /MIRROR as detailed in the previous section.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/4288470936320751164/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/mirroring-pypi-locally.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4288470936320751164'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4288470936320751164'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/mirroring-pypi-locally.html' title='Mirroring PyPI locally'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-5522918293815207142</id><published>2016-12-10T09:54:00.002+09:00</published><updated>2017-08-21T17:43:44.907+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="couchdb"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>How to create a mirror of the entire npm index including attachments using npm-fullfat-registry fullfat.js</title><content type='html'>In a &lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2016/10/slow-transfer-times-when-creating-local.html&quot;&gt;previous post&lt;/a&gt; I attempted to create a local npm mirror by simply caching all packages I installed using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm install &lt;i&gt;pkgname&lt;/i&gt;&lt;/span&gt;. Unfortunately, this approach is very slow, downloading only about 100 MB per hour. Considering that all the packages in npm take up more than 1.2 TB, this speed won&#39;t do. The recommended method for creating a local npm mirror is to use the nosql couchdb. In this method, packages from npm are stored directly in couchdb.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Step One&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Install couchdb from your distro&#39;s package manager or download from the Apache CouchDB page and build from source. As of Dec 10, 2016 version 1.6 is available from the Fedora 24 official repos while version 2.0+ is available from the Archlinux repos.&lt;br /&gt;
&lt;br /&gt;
Once couchdb is installed, start the couchdb service. On Fedora 24+ and Archlinux, you can do this with:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo systemctl start couchdb&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Step Two&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Access Fauxton, the web GUI for couchdb by navigating to:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;http://localhost:5984/_utils&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Follow the prompts to create an admin user and password. If you don&#39;t create an admin user, anyone connecting to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;localhost:5984&lt;/span&gt; will be able to create and delete databases. Also create a new database by clicking on the gear icon at the top-left. The screenshot below shows the Fauxton UI for couchdb 1.6:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkGO1KJDxHISc8arTQQGh4NzfF2sKg4Zx-v_hqLw2eQOXzZfagFru5hl9hyPZ7jXyh7L1tmGTsGziSO9Rc6q99-ToxXvzER_C2xV9eSpKb2fISHhLS5oN2kWeMuRauz4wdbXZruDB60A/s1600/2016-12-10-093141_1366x768_scrot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkGO1KJDxHISc8arTQQGh4NzfF2sKg4Zx-v_hqLw2eQOXzZfagFru5hl9hyPZ7jXyh7L1tmGTsGziSO9Rc6q99-ToxXvzER_C2xV9eSpKb2fISHhLS5oN2kWeMuRauz4wdbXZruDB60A/s400/2016-12-10-093141_1366x768_scrot.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Step Three&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Make sure that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm&lt;/span&gt; (nodejs package manager) is installed and then create a new directory into which you will install the npm package &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm-fullfat-registry&lt;/span&gt;. Then from that directory, run as local user:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm install npm-fullfat-registry&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You will then find a sub-directory named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;node_modules&lt;/span&gt; and below that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm-fullfat-registry/bin&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cd node_modules/npm-fullfat-registry/bin&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In this sub-directory you will find a single file named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This is the program you need to execute in order to create a local npm mirror, assuming you have already installed couchdb and have created a DB for this program to write to.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; takes the following arguments:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-f&lt;/span&gt; or &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--fat&lt;/span&gt; : the url to the couchdb database for storing packages&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-s&lt;/span&gt; or &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--skim&lt;/span&gt; : the url to the npm package index&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--seq-file&lt;/span&gt; : file which keeps track of the current package being downloaded from npm&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--missing-log&lt;/span&gt; : file which stores the names and sequence numbers of packages that cannot be found&lt;br /&gt;
&lt;br /&gt;
To save myself the hassle of entering these parameters every time I want to invoke fullfat.js, I created a convenience script in Bash:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# fullfat.sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Last Updated: 2016-11-08&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Jun Go&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Invokes fullfat.js for creating a local npm mirror containing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# npm index as well as attachments. This script is intended to&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# be launched by &#39;npm-fullfat-helper.sh&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;LOCALDB=http://user:pw@localhost:5984/registry&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;SKIMDB=https://skimdb.npmjs.com/registry&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;./fullfat.js -f $LOCALDB -s $SKIMDB --seq-file=registry.seq \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;--missing-log=missing.log&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Of course you will need to edit the username and password for accessing Fauxton. The script above works, but it is not sufficient. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; crashes every so often so I created a monitor script to restart my &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.sh&lt;/span&gt; wrapper script whenever &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; crashes. My monitor script is named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm-fullfat-helper.sh&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;#!/bin/bash&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# npm-fullfat-helper.sh&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Last Updated: 2016-11-08&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Jun Go&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# During the mirroring process for npm, binary file attachments&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# are saved into a local couchdb DB named &#39;registry&#39;, but sometimes&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# downloading some packages fails or times out, which stops the&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# entire process. If you manually resume with fullfat.js, you can&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# start again where you left off. This script removes the need to&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# do this manually.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;until ./fullfat.sh; do&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; printf &quot;%s\n&quot; &quot;fullfat.js crashed with exit code $?. Respawning&quot; &amp;gt;&amp;amp;2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; sleep 1&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;done&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Using the script above, mirroring npm with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; becomes much more robust as it will be re-launched if the process returns anything other than exit code 0. But this is still not sufficient, because sometimes &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; gets stuck while trying to download certain packages. No matter how many times it is restarted, certain packages (especially those with dozens of versions) never complete downloading, so you will be left with a lot of tar.gz files in temp directories but no final PUT command to couchdb. When this happens you have to manually edit the sequence file (which keeps track of which package is currently being downloaded). For example, if &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; is stuck and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;registry.seq&lt;/span&gt; contains the number 864117, you must increment the number by 1 to 864117. Then if you relaunch the monitor script, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; should go on to the next package. If the package name is still unchanged, edit &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;registry.seq&lt;/span&gt; once more by incrementing the new sequence by one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: large;&quot;&gt;Conclusion&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Mirroring the npm index with file attachments using couchdb is much faster than simply caching packages installed through &lt;i&gt;npm install foo&lt;/i&gt;. I get speeds of about 1 GB/hr. The problem is that manual intervention is required when &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; gets stuck, i.e. you must manually change the sequence number stored in the sequence file (which I called &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;registry.seq&lt;/span&gt; above) so that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt; will skip a problematic package and go on to the next one. Another inconvenience is that as of Dec 12, 2016 the &lt;a href=&quot;https://www.npmjs.com/package/npm-fullfat-registry&quot;&gt;documentation for npm-fullfat-registry&lt;/a&gt; has not been updated. If you follow along with these old instructions, you will be told to invoke the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;npm-fullfat-registry -f [url to local db] -s [url to npm package index]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
But this won&#39;t work because the program you need to actually execute is &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;fullfat.js&lt;/span&gt;. Simply replace &lt;i&gt;npm-fullfat-registry&lt;/i&gt; above with &lt;i&gt;fullfat.js&lt;/i&gt; and you&#39;ll be good to go. Keep in mind that the path to fullfat.js is&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;node_modules/npm-fullfat-registry/bin&lt;/span&gt;&amp;nbsp;in the directory into which you invoked &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm install npm-fullfat-registry&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/5522918293815207142/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/how-to-create-mirror-of-entire-npm.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/5522918293815207142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/5522918293815207142'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/how-to-create-mirror-of-entire-npm.html' title='How to create a mirror of the entire npm index including attachments using npm-fullfat-registry fullfat.js'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhkGO1KJDxHISc8arTQQGh4NzfF2sKg4Zx-v_hqLw2eQOXzZfagFru5hl9hyPZ7jXyh7L1tmGTsGziSO9Rc6q99-ToxXvzER_C2xV9eSpKb2fISHhLS5oN2kWeMuRauz4wdbXZruDB60A/s72-c/2016-12-10-093141_1366x768_scrot.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-4788549825040911025</id><published>2016-12-01T14:33:00.001+09:00</published><updated>2016-12-02T09:58:34.768+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><category scheme="http://www.blogger.com/atom/ns#" term="X11"/><title type='text'>Using an external monitor with bumblebee and intel-virtual-output</title><content type='html'>I have an ASUS U36JC which uses both Intel integrated video and an Nvidia GeForce 310M GPU. On Windows, Nvidia has a solution called Optimus that will automatically switch between the Intel and Nvidia GPU&#39;s depending on the computing task. For example, when you are editing a document, the notebook will use the low-power integrated Intel GPU and when you are watching a movie or doing video editing, the notebook will use the power-hungry Nvidia GPU.&lt;br /&gt;
&lt;br /&gt;
On Linux, however, this GPU-switching does not happen automatically. There are several different ways you can enable Nvidia GPU&#39;s on Linux, but I chose &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;bumblebee-nvidia&lt;/span&gt; with the proprietary Nvidia driver as I explain in a &lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2016/11/installing-nvidia-driver-for-geforce.html&quot;&gt;previous post&lt;/a&gt;. To launch regular applications using the Nvidia GPU, you must launch your program by prefixing it with &#39;optirun&#39;, i.e.:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;optirun [program name]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
But in order to use multiple monitors on an Optimus-enabled notebook like the ASUS U36JC, you can&#39;t just invoke something like &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;optirun startx&lt;/span&gt;. You need to edit a few Bumblebee X11 settings and make sure that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;bumblebeed&lt;/span&gt;&amp;nbsp;(bumblebee daemon) is running to use the HDMI external monitor port (which is hard-wired to the discrete Nvidia GPU. The VGA port on the ASUS U36JC uses Intel integrated graphics, however, so bumblee is not required)&lt;br /&gt;
&lt;br /&gt;
The required steps to use an external monitor through the HDMI port on Fedora 24 are as follows:&lt;br /&gt;
&lt;br /&gt;
1. Make sure you have already installed and configured &lt;a href=&quot;https://fedoraproject.org/wiki/Bumblebee&quot;&gt;bumblebee&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
2. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo dnf install intel-gpu-tools&lt;/span&gt; (this pkg contains &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;intel-virtual-output&lt;/span&gt;)&lt;br /&gt;
&lt;br /&gt;
3. In&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/bumblebee/xorg.conf.nvidia&lt;/span&gt; make the following changes:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Option &amp;nbsp; &amp;nbsp; &amp;nbsp;&quot;AutoAddDevices&quot; &quot;true&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Option &quot;UseEDID&quot; &quot;true&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# &amp;nbsp; &amp;nbsp;Option &quot;UseDisplayDevice&quot; &quot;none&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
You can see my edited &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;xorg.conf.nvidia&lt;/span&gt; file here:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://gist.github.com/gojun077/ef3cc378313cbde5e7768c0716265a1d&quot;&gt;https://gist.github.com/gojun077/ef3cc378313cbde5e7768c0716265a1d&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;br /&gt;
4. Start bumblebee daemon: &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo systemctl start bumblebeed&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
5. Launch &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;intel-virtual-output&lt;/span&gt; (the default is to launch as a daemon, but I will launch in foreground mode so I can easily kill the process with Ctrl-C when I am done using an external monitor). You can run this program as the local user (When executing as root, it doesn&#39;t work).&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# intel-virtual-output -f&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now X windows should be able to detect an external monitor connected to the video ports wired to the Nvidia GPU. Running &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;xfce4-display-settings&lt;/span&gt; shows the following:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFy0u-FS-n_ALZZok4a78FaLbpPii86KdYJRJ_iaNihMV17NYFvx8HAQHf7H6tUsjhT5MSKbNqUe8sW_Z7d2grHGyEosvLrqvrABTRUGYiEa-mXe6X52ripv1ILPhV6WJUk6VwzrdFjg/s1600/multi-monitor-bumblebee.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;223&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFy0u-FS-n_ALZZok4a78FaLbpPii86KdYJRJ_iaNihMV17NYFvx8HAQHf7H6tUsjhT5MSKbNqUe8sW_Z7d2grHGyEosvLrqvrABTRUGYiEa-mXe6X52ripv1ILPhV6WJUk6VwzrdFjg/s320/multi-monitor-bumblebee.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
The monitor named &quot;VIRTUAL&quot; is a path-through interface created by &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;intel-virtual-output&lt;/span&gt;.&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Arandr&lt;/span&gt;, the front-end to the Xorg screen layout/orientation tool &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;xrandr&lt;/span&gt;, also detects multiple screens:&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLn5rtle6XXluZTaW5knUV9a80k3QOEHjWg9eaKbQq8czjibj8bkl9IvtNDi9wvKGVgbSJOoKeVBli8a6hBkobmPPOgyMObpzt5V-_b6JWSXpIJtNkHC9DTqNJNbsAyAMuD2YyhJtPkA/s1600/arandr-multiple-monitors-bumblebee.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhLn5rtle6XXluZTaW5knUV9a80k3QOEHjWg9eaKbQq8czjibj8bkl9IvtNDi9wvKGVgbSJOoKeVBli8a6hBkobmPPOgyMObpzt5V-_b6JWSXpIJtNkHC9DTqNJNbsAyAMuD2YyhJtPkA/s320/arandr-multiple-monitors-bumblebee.png&quot; width=&quot;284&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://wiki.archlinux.org/index.php/bumblebee#Output_wired_to_the_NVIDIA_chip&quot;&gt;https://wiki.archlinux.org/index.php/bumblebee#Output_wired_to_the_NVIDIA_chip&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://bugzilla.redhat.com/show_bug.cgi?id=1195962&quot;&gt;https://bugzilla.redhat.com/show_bug.cgi?id=1195962&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/4788549825040911025/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/using-external-monitor-with-bumblebee.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4788549825040911025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4788549825040911025'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/12/using-external-monitor-with-bumblebee.html' title='Using an external monitor with bumblebee and intel-virtual-output'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjFy0u-FS-n_ALZZok4a78FaLbpPii86KdYJRJ_iaNihMV17NYFvx8HAQHf7H6tUsjhT5MSKbNqUe8sW_Z7d2grHGyEosvLrqvrABTRUGYiEa-mXe6X52ripv1ILPhV6WJUk6VwzrdFjg/s72-c/multi-monitor-bumblebee.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-6746115029944071870</id><published>2016-11-12T09:27:00.002+09:00</published><updated>2016-12-18T10:03:07.455+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="nvidia"/><title type='text'>Installing Nvidia driver for GeForce 310m on Fedora 24 with bumblebee-nvidia</title><content type='html'>My Asus U36JC notebook contains both Intel integrated graphics and an Nvidia GeForce 310M. Here are the results from &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;lspci&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;01:00.0 VGA compatible controller: NVIDIA Corporation GT218M [GeForce 310M] (rev ff)&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This notebook supports Nvidia&#39;s Optimus, which switches between integrated Intel video and the discrete Nvidia card depending on the computing task. For 3D-intensive workloads, the Nvidia card should be used. While this works OOTB on Windows 7+, on Linux you must do the switching manually. One project that makes this possible is Bumblebee. When you want to launch a certain program with the discrete Nvidia card, you simply prefix the program launch command with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;optirun&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
I tried the open-source nouveau driver for my Nvidia GeForce 310M but I found the frame rate lacking when playing games so I switched to using Nvidia&#39;s proprietary driver. When you are searching for the Nvidia Linux driver for an older video card, DO NOT go to the main page for your video card and download drivers from there; if you do that, you will only be able to find old drivers for Linux kernel 2.4.X and 2.6.X, and these drivers are incompatible with Fedora 24 (which as of Nov. 13, 2016 is at &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;4.8.6.-201.fc24.x86_64&lt;/span&gt;)&lt;br /&gt;
&lt;br /&gt;
Instead, to download the newest proprietary Nvidia Linux driver blobs, you must go to the following link and find your card:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.nvidia.com/object/IO_32667.html&quot;&gt;http://www.nvidia.com/object/IO_32667.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Then you can download the appropriate driver from the following link:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.nvidia.com/object/unix.html&quot;&gt;http://www.nvidia.com/object/unix.html&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
For my Nvidia GeForce 310M, the latest proprietary driver as of Nov. 13, 2016 is&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;NVIDIA-Linux-x86_64-340.98&lt;/span&gt; which can be downloaded from here:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.nvidia.com/Download/driverResults.aspx/107868/en-us&quot;&gt;http://www.nvidia.com/Download/driverResults.aspx/107868/en-us&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Now it&#39;s time to install Bumblebee. I added the following repos for Bumblebee with Nvidia closed-source driver and unmanaged Nvidia Fedora repo:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora24/noarch/bumblebee-release-1.2-1.noarch.rpm&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree-unmanaged/fedora24/noarch/bumblebee-nonfree-unmanaged-release-1.2-1.noarch.rpm&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I then installed the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Now copy the Nvidia binary blob which you downloaded earlier (it has the extension &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.run&lt;/span&gt;) into &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/sysconfig/nvidia&lt;/span&gt;&amp;nbsp;and then execute the following:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$ &lt;span style=&quot;color: blue;&quot;&gt;sudo bumblebee-nvidia --debug&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[sudo] password for fedjun:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--debug mode selected.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Building NVIDIA video drivers: Creating directory NVIDIA-Linux-x86_64-340.98&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Verifying archive integrity... OK&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Uncompressing NVIDIA Accelerated Graphics Driver for Linux-x86_64 340.98.................................................................................................................................................................................................................................&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;span class=&quot;Apple-tab-span&quot; style=&quot;white-space: pre;&quot;&gt;    &lt;/span&gt; &amp;nbsp; [ &amp;nbsp;&lt;span style=&quot;color: lime;&quot;&gt;OK&lt;/span&gt; &amp;nbsp;]&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
You may be prompted to manually build bbswitch using DKMS during the installation. Note you will have to manually rebuild your Nvidia driver using the above command every time your kernel is upgraded. Once you build the driver, you may have to restart your machine to get &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;bumblebeed&lt;/span&gt; to work.&lt;br /&gt;
&lt;br /&gt;
Now make sure bumblebeed is running:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[fedjun@u36jcFedora nvidia]$ &lt;span style=&quot;color: blue;&quot;&gt;systemctl status bumblebeed&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;span style=&quot;color: lime;&quot;&gt;●&lt;/span&gt; bumblebeed.service - Bumblebee C Daemon&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Loaded: loaded (/usr/lib/systemd/system/bumblebeed.service; enabled; vendor preset: disabled)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;Active: &lt;span style=&quot;color: lime;&quot;&gt;active (running)&lt;/span&gt; since Sat 2016-11-12 09:21:47 KST; 24s ago&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp;Main PID: 20004 (bumblebeed)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; Tasks: 1 (limit: 512)&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp;CGroup: /system.slice/bumblebeed.service&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;└─20004 /usr/sbin/bumblebeed&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Nov 12 09:21:47 u36jcFedora systemd[1]: Started Bumblebee C Daemon.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;Nov 12 09:21:47 u36jcFedora bumblebeed[20004]: [ 2077.225663] [INFO]/usr/sbin/bumblebeed 3.2.1 started&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Finally, test that glxgears runs with your Nvidia card:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$ optirun glxgears&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You should see an OpenGL window appear with 3 rotating gears. Press ESC to exit the window.&lt;br /&gt;
&lt;br /&gt;
When I play Pillars of Eternity 3.03, I launch the game as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;$ optirun ./start.sh&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I get much better frame rates when using the Nvidia discrete video card with this game.&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://fedoraproject.org/wiki/Bumblebee&quot;&gt;https://fedoraproject.org/wiki/Bumblebee&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://github.com/Bumblebee-Project/Bumblebee/issues/814&quot;&gt;https://github.com/Bumblebee-Project/Bumblebee/issues/814&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/6746115029944071870/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/11/installing-nvidia-driver-for-geforce.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6746115029944071870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/6746115029944071870'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/11/installing-nvidia-driver-for-geforce.html' title='Installing Nvidia driver for GeForce 310m on Fedora 24 with bumblebee-nvidia'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-1830238482530882978</id><published>2016-10-29T09:55:00.001+09:00</published><updated>2016-10-29T09:55:46.578+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="javascript"/><category scheme="http://www.blogger.com/atom/ns#" term="npm"/><title type='text'>Slow transfer times when creating a local npm package mirror</title><content type='html'>In the current project I&#39;m working on, the client wants developers to install packages from local mirrors of Ubuntu, PyPI, and npm. Creating local mirrors of Ubuntu default repositories is easy with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;apt-mirror&lt;/span&gt;, and PyPI can also be mirrored easily with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;Bandersnatch&lt;/span&gt;. Mirroring the npm repo, however, is not so easy. I followed guides which recommend creating a mirror with CouchDB, but I couldn&#39;t get this method to work. Instead, I set up Sinopia as an npm cache server so that every time I install an npm package locally it is also saved in Sinopia. The next time I try to install the same package, it will be installed from the Sinopia cache instead of from the npm site.&lt;br /&gt;
&lt;br /&gt;
The problem with using Sinopia as a full npm mirror is that it will not automatically download packages. You must manually install npm packages with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;npm install &lt;i&gt;pkgname&lt;/i&gt;&lt;/span&gt;. I got a list of all the packages in npm from&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;http://skimdb.npmjs.com/registry/_all_docs&lt;/span&gt; and then parsed the file to get only package names. I then wrote the following script to download packages from npm (which will then be stored in Sinopia):&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/gojun077/3c1c875f4e253158f1280e18db52a4eb.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
As of October 2016 when I mirrored PyPI using Bandersnatch, downloading 380GB took about 1.5 days on a 500 Mbit/s connection. Mirroring Ubuntu 14.04 and 16.04 repos requires 300GB each and takes almost one day for each. But using my bash script, I am only getting speeds of about 100MB per hour. Considering that npm is currently 1.2 TB in size, it would take me over 1200 days to create a complete npm mirror at the current download speed. Why is npm so slow compared to Ubuntu repos and PyPI?</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/1830238482530882978/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/slow-transfer-times-when-creating-local.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1830238482530882978'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/1830238482530882978'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/slow-transfer-times-when-creating-local.html' title='Slow transfer times when creating a local npm package mirror'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-8087209336041631185</id><published>2016-10-22T09:28:00.002+09:00</published><updated>2016-10-22T09:28:48.329+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><category scheme="http://www.blogger.com/atom/ns#" term="packstack"/><title type='text'>Adding nodes to Openstack Mitaka with Packstack</title><content type='html'>In my initial Openstack Mitaka deployment on four Fujitsu servers, I used a customized answer file specifying Neutron OVS bridge interfaces and the slave interfaces for bridges. The relevant setting in the answer file is:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eno1,br-eno2:eno2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
However, I want to add 2 additional compute nodes which are a different kind of server, namely IBM. The interfaces are named differently, so the slave interfaces for &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;br-ex&lt;/span&gt; and &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;br-eno2&lt;/span&gt; will be different.&lt;br /&gt;
&lt;br /&gt;
I copied my original answer file and renamed it &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;mitaka-ibm.cfg&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Inside this answer file, I simply edited the field&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CONFIG_COMPUTE_HOSTS=10.10.10.6,10.10.10.7&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and added the mgmt network IP&#39;s for the two new compute hosts and removed the IP&#39;s for the existing compute nodes.&lt;br /&gt;
&lt;br /&gt;
I then edited&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:enp1s0,br-eno2:enp2s0&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
to change the slave interface names for the bridge interfaces on the 2 IBM servers.&lt;br /&gt;
&lt;br /&gt;
Since I don&#39;t want Packstack to overwrite the config on existing Openstack nodes, I also added the mgmt network IP&#39;s as well as external network IP for Horizon to the following field:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;EXCLUDE_SERVERS=10.10.10.2,10.10.10.3,10.10.10.4,10.10.10.5,192.168.4.51&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
However, the field&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;CONFIG_CONTROLLER_HOST=192.168.4.51&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
must be filled in with the external IP of the control node, otherwise the installation will fail when running the puppet file &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;nova.pp&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;a href=&quot;https://www.rdoproject.org/install/adding-a-compute-node/&quot;&gt;https://www.rdoproject.org/install/adding-a-compute-node/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/8087209336041631185/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/adding-nodes-to-openstack-mitaka-with.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8087209336041631185'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8087209336041631185'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/adding-nodes-to-openstack-mitaka-with.html' title='Adding nodes to Openstack Mitaka with Packstack'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-15617351221189723</id><published>2016-10-15T09:45:00.002+09:00</published><updated>2016-10-15T09:45:46.615+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="PXE"/><title type='text'>Boot Information Negotiation Layer (BINL) UDP 4011 must be opened for PXE</title><content type='html'>I wrote &lt;a href=&quot;https://bitbucket.org/gojun077/bin-scripts/src/e1ef791f82cac01690f4c5b3f471e42163fbf847/firewalld_pxe.sh?at=master&amp;amp;fileviewer=file-view-default&quot;&gt;a script&lt;/a&gt; that opens ports in the firewalld dynamic firewall so I can run a PXE server, but I neglected to add one port -- UDP 4011 for the Boot Information Negotiation Layer. Once the kernel and initrd are sent by TFTP, I use http to send installation files from a mounted iso.&lt;br /&gt;
&lt;br /&gt;
The ports I open are as follows:&lt;br /&gt;
&lt;br /&gt;
UDP 69 (TFTP)&lt;br /&gt;
UDP 4011 (BINL)&lt;br /&gt;
UDP 67, 68 (DHCP)&lt;br /&gt;
TCP 5500 (VNC)&lt;br /&gt;
&lt;br /&gt;
In the script I don&#39;t pass all port names explicitly; some can simply be passed as service names to &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;firewall-cmd&lt;/span&gt;, which figures out which port numbers to open.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;b&gt;References:&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://www.configmgr.no/2012/03/21/ports-used-by-pxeosd/&quot;&gt;http://www.configmgr.no/2012/03/21/ports-used-by-pxeosd/&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/15617351221189723/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/boot-information-negotiation-layer-binl.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/15617351221189723'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/15617351221189723'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/boot-information-negotiation-layer-binl.html' title='Boot Information Negotiation Layer (BINL) UDP 4011 must be opened for PXE'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-2366672163290530115</id><published>2016-10-08T09:48:00.002+09:00</published><updated>2016-11-25T18:20:15.293+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archlinux"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="PXE"/><category scheme="http://www.blogger.com/atom/ns#" term="uefi"/><title type='text'>Install Archlinux over UEFI PXE from an existing PXE server</title><content type='html'>&lt;div&gt;
When installing Linux over UEFI PXE, GRUB2 &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grub.cfg&lt;/span&gt; is used as the PXE image menu. Archlinux has some idiosyncratic PXE options which I will detail in this post.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
As of Oct. 2016, the Archlinux wiki has a &lt;a href=&quot;https://wiki.archlinux.org/index.php/PXE#Existing_PXE_Server&quot;&gt;sample Legacy BIOS PXE menu entry&lt;/a&gt; but this format cannot be used verbatim for UEFI PXE.&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
First, download the latest Archlinux installation iso from the following link:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://www.archlinux.org/download/&quot;&gt;https://www.archlinux.org/download/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Mount the iso and note the following paths in the mounted image:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;b&gt;/arch/boot/x86_64&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
contains the linux kernel and initrd image for 64-bit&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;kernel: &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vmlinuz&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;initrd: &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;archiso.img&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;/arch/boot&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
contains intel microcode and memtest&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;intel_ucode.img&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;memtest&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
In most other Linux distros, the initrd image on installation iso&#39;s is named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;initrd.img&lt;/span&gt; but Archlinux uses &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;archiso.img&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The Archlinux-specific Kernel boot parameters for PXE are as follows:&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;archisobaseddir=arch&lt;/span&gt; Specifies the root directory of the installation iso&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;archiso_http_srv=http://ip.ad.d.r:port/&lt;/span&gt; Specifies installation file location over http (you can also use &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nbd&lt;/span&gt;&amp;nbsp;and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nfs&lt;/span&gt; instead of &lt;i&gt;http&lt;/i&gt;)&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;ip=:::::eth0:dhcp&lt;/span&gt; Tells the Arch kernel to bring up the network iface (on the machine to be installed with Arch) and get an IP address via &amp;nbsp; DHCP. For predictability, the network iface in the Arch chroot environment is always named &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;eth0&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
Keep in mind that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;eth0&lt;/span&gt; is just a temporary name for your wired iface during installation. Once installation is complete and you exit the Arch install chroot and restart, your wired interface will come up with a systemd-style network device name.&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
My &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grub.cfg&lt;/span&gt; for UEFI PXE can be seen here:&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://github.com/gojun077/pxe-config/blob/master/grub.cfg&quot;&gt;https://github.com/gojun077/pxe-config/blob/master/grub.cfg&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The menu entry in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grub.cfg&lt;/span&gt; for Archlinux UEFI should look like this if you are installing over http:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;menuentry &#39;Archlinux iso 2016.09.03&#39; --class arch --class gnu-linux --class gnu --class os {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &#39;Loading kernel vmlinuz from installation ISO...&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; linuxefi images/archlinux/vmlinuz archisobaseddir=arch archiso_http_srv=http://192.168.95.97:8080/ ip=:::::eth0:dhcp&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; echo &#39;Loading initial ramdisk ...&#39;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; initrdefi images/archlinux/intel_ucode.img images/archlinux/archiso.img&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
For information on how to setup a PXE server that can install to both UEFI and Legacy BIOS machines, refer to my previous post on this topic:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2016/02/uefi-and-legacy-bios-pxe-netboot.html&quot;&gt;https://eatpeppershothot.blogspot.kr/2016/02/uefi-and-legacy-bios-pxe-netboot.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
If you don&#39;t have UEFI hardware lying around for testing, you can use KVM with OVMF Tianocore UEFI. I detail how to get started in the following post:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://eatpeppershothot.blogspot.kr/2016/07/enable-pxe-netboot-in-kvm-guests-for.html&quot;&gt;https://eatpeppershothot.blogspot.kr/2016/07/enable-pxe-netboot-in-kvm-guests-for.html&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/2366672163290530115/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/install-archlinux-over-uefi-pxe-from.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2366672163290530115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2366672163290530115'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/10/install-archlinux-over-uefi-pxe-from.html' title='Install Archlinux over UEFI PXE from an existing PXE server'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-2345697180600062249</id><published>2016-09-30T02:42:00.000+09:00</published><updated>2016-09-30T02:42:05.368+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="mitaka"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><title type='text'>Openstack Mitaka - Changing ceilometer default polling period in pipeline.yaml</title><content type='html'>I am currently working on a four-node installation of Openstack Mitaka and while testing Ceilometer alarm functionality, I ran into the problem of the alarm state always displaying &lt;i&gt;insufficient data&lt;/i&gt;. Of the four nodes, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mgmt01&lt;/span&gt; is the storage node running glance and cinder, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mgmt02&lt;/span&gt; is the control node running nova-manager, keystone, ceilometer, heat, horizon, etc., and two compute nodes, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;compute01&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;compute02&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
By default, Ceilometer telemetry gathers data every 600 seconds, but you can change &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;interval: 600&lt;/span&gt; (in seconds) to some smaller value. Here&#39;s a link to the default version of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/ceilometer/pipeline.yaml&lt;/span&gt; for Openstack Mitaka:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://gist.github.com/gojun077/8d7b9e8afc22c8f5d5014c883f8c1cf9&quot;&gt;https://gist.github.com/gojun077/8d7b9e8afc22c8f5d5014c883f8c1cf9&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
On my control node, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mgmt02&lt;/span&gt;, I made sure to edit this file so that ceilometer would poll gauges every 60 seconds by using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;interval: 60&lt;/span&gt; in several places throughout the file.&lt;br /&gt;
&lt;br /&gt;
Next I created a new Cirros VM named &lt;u&gt;cirros-test-meter&lt;/u&gt; with only an internal network interface:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# openstack server create --image cirros-d160722-x86_64 \&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;--flavor m1.tiny \&lt;br /&gt;--nic net-id=bc7730ce-80e8-47e1-96e5-c4103ed8e37c cirros-test-meter&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
To get the &lt;b&gt;UUID&lt;/b&gt; of cirros-test-meter:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;openstack server list&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;b&gt;f3280890-1b60-4a6c-8df5-7195dbb00ca3&lt;/b&gt; | cirros-test-meter | ACTIVE&amp;nbsp; | private=192.168.95.142&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I then created a ceilometer alarm for the cirros vm that would track cpu usage (using ceilometer gauge &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cpu_util&lt;/span&gt;) and trigger an alarm if cpu utilization went above 70% for more than two consecutive 60 second periods.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# ceilometer alarm-threshold-create --name cpu_high \&lt;br /&gt;--description &#39;CPU usage high&#39; --meter-name cpu_util \&lt;br /&gt;--threshold 70 --comparison-operator gt --statistic avg \&lt;br /&gt;--period 60 --evaluation-periods 2 --alarm-action &#39;log://&#39; \&lt;br /&gt;--query resource_id=f3280890-1b60-4a6c-8df5-7195dbb00ca3&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note that since Openstack Liberty, the &lt;i&gt;alarm-action&lt;/i&gt; &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&#39;log://&#39;&lt;/span&gt; will log alarms to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/var/log/aodh/notifications.log&lt;/span&gt; instead of to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/var/log/ceilometer/alarm-notifier.log&lt;/span&gt; so don&#39;t go looking for alarm logs in the wrong path!&lt;br /&gt;
&lt;br /&gt;
Verify that the alarm &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cpu_high&lt;/span&gt; was created:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;ceilometer alarm-list&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;| Alarm ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | State&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Severity | Enabled | Continuous | Alarm condition&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Time constraints |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--------------------------------------+----------+-------------------+----------+---------+------------+-------------------------------------+------------------+&lt;br /&gt;| 23651a53-19cf-4bb0-97e0-09fab14445cd | cpu_high | insufficient data | low&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | True&amp;nbsp;&amp;nbsp;&amp;nbsp; | False&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | avg(cpu_util) &amp;gt; 70.0 during 2 x 60s | None&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;/span&gt;&lt;br /&gt;
Since the alarm was just created, I will have to wait at least two 60 sec periods before the alarm has enough data.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I create high cpu load inside the cirros vm with the following while loop:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;while [ 1 ] ; do&lt;br /&gt;&amp;nbsp; echo $((13**99)) 1&amp;gt;/dev/null 2&amp;gt;&amp;amp;1&lt;br /&gt;done &amp;amp;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
This calculates 13 to the 99th power in an infinite loop. You can later kill this process by running &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;top&lt;/span&gt;, finding the PID of the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/bin/sh&lt;/span&gt; process running the above shell command, and killing it with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sudo kill -15 &lt;i&gt;PID&lt;/i&gt;&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
This will immediately start generating 100% cpu load.&lt;br /&gt;
&lt;br /&gt;
Just to make sure, let&#39;s see what meters are available for the cirros vm:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;ceilometer meter-list --query \&lt;br /&gt;&amp;nbsp; resource=f3280890-1b60-4a6c-8df5-7195dbb00ca3&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;| Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Type&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Unit&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Resource ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | User ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Project ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; +--------------------------+------------+-----------+--------------------------------------+----------------------------------+----------------------------------+&lt;br /&gt;| cpu&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | cumulative | ns&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | f3280890-1b60-4a6c-8df5-7195dbb00ca3 | dfb630234e4e4155871611d5e60dc1d4 | ada4ee7cb446439abbe887601c87c900 |&lt;br /&gt;| cpu.delta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | delta&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | ns&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | f3280890-1b60-4a6c-8df5-7195dbb00ca3 | dfb630234e4e4155871611d5e60dc1d4 | ada4ee7cb446439abbe887601c87c900 |&lt;br /&gt;| cpu_util&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | gauge&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | %&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | f3280890-1b60-4a6c-8df5-7195dbb00ca3 | dfb630234e4e4155871611d5e60dc1d4 | ada4ee7cb446439abbe887601c87c900 |&lt;br /&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You will see that the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cpu_util&lt;/span&gt; ceilometer gauge exists for &lt;i&gt;cirros-meter-test&lt;/i&gt;.&lt;br /&gt;
&lt;br /&gt;
Several minutes passed, and so I got a list of cpu_util sample values from ceilometer:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;ceilometer sample-list --meter cpu_util --query \&lt;br /&gt;&amp;nbsp; resource=f3280890-1b60-4a6c-8df5-7195dbb00ca3&lt;/span&gt;&lt;br /&gt;+--------------------------------------+----------+-------+---------------+------+----------------------------+&lt;br /&gt;| Resource ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Type&amp;nbsp; | Volume&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Unit | Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;+--------------------------------------+----------+-------+---------------+------+----------------------------+&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.75779497&amp;nbsp; | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:56:31.816000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.483886216 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:46:31.852000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 42.2381838593 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:36:31.826000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 4.27827845015 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:26:31.942000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 4.42085822432 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:16:31.935000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 4.41009081847 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T04:06:31.825000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 3.69494435414 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T03:56:31.837000 |&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
But something is not right. Although the latest readings for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cpu_util&lt;/span&gt; are more than 100% (remember my alarm &lt;i&gt;cpu_high&lt;/i&gt; should be triggered if &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;cpu_util&lt;/span&gt; &amp;gt; 70%), you will notice that the polling interval is every 10 minutes:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016-09-27T04:56&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016-09-27T04:46&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016-09-27T04:36&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016-09-27T04:26&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;2016-09-27T04:16&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;...&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I definitely edited &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/ceilometer/pipeline.yaml&lt;/span&gt; on my control node &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mgmt02&lt;/span&gt; so that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;interval: 60&lt;/span&gt; instead of 600 and then restarted ceilometer on the control node with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;openstack-service restart ceilometer&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It turns out that I also have to edit &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/ceilometer/pipeline.yaml&lt;/span&gt; on both of my Nova compute nodes as well! Running &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;openstack-service status&lt;/span&gt; on &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;mgmt02&lt;/span&gt; I get:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;[root@osmgmt02 ~(keystone_admin)]# &lt;span style=&quot;color: blue;&quot;&gt;openstack-service status&lt;/span&gt;&lt;br /&gt;MainPID=26342 Id=neutron-dhcp-agent.service ActiveState=active&lt;br /&gt;MainPID=26371 Id=neutron-l3-agent.service ActiveState=active&lt;br /&gt;MainPID=26317 Id=neutron-lbaas-agent.service ActiveState=active&lt;br /&gt;MainPID=26551 Id=neutron-metadata-agent.service ActiveState=active&lt;br /&gt;MainPID=26299 Id=neutron-metering-agent.service ActiveState=active&lt;br /&gt;MainPID=26411 Id=neutron-openvswitch-agent.service ActiveState=active&lt;br /&gt;MainPID=26315 Id=neutron-server.service ActiveState=active&lt;br /&gt;MainPID=26265 Id=openstack-aodh-evaluator.service ActiveState=active&lt;br /&gt;MainPID=26455 Id=openstack-aodh-listener.service ActiveState=active&lt;br /&gt;MainPID=26508 Id=openstack-aodh-notifier.service ActiveState=active&lt;br /&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;MainPID=19412 Id=openstack-ceilometer-central.service ActiveState=active&lt;br /&gt;MainPID=19416 Id=openstack-ceilometer-collector.service ActiveState=active&lt;br /&gt;MainPID=19414 Id=openstack-ceilometer-notification.service &lt;/span&gt;ActiveState=active&lt;br /&gt;MainPID=26577 Id=openstack-gnocchi-metricd.service ActiveState=active&lt;br /&gt;MainPID=26236 Id=openstack-gnocchi-statsd.service ActiveState=active&lt;br /&gt;MainPID=26535 Id=openstack-heat-api.service ActiveState=active&lt;br /&gt;MainPID=26861 Id=openstack-heat-engine.service ActiveState=active&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;&lt;span style=&quot;font-family: inherit;&quot;&gt;(Note: I am missing heat-api-cfn.service, which is necessary for autoscaling with Heat templates)&lt;/span&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;MainPID=26781 Id=openstack-nova-api.service ActiveState=active&lt;br /&gt;MainPID=26753 Id=openstack-nova-cert.service ActiveState=active&lt;br /&gt;MainPID=26691 Id=openstack-nova-conductor.service ActiveState=active&lt;br /&gt;MainPID=26316 Id=openstack-nova-consoleauth.service ActiveState=active&lt;br /&gt;MainPID=26603 Id=openstack-nova-novncproxy.service ActiveState=active&lt;br /&gt;MainPID=26702 Id=openstack-nova-scheduler.service ActiveState=active&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
And on both of my Nova nodes &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;compute01&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;compute02&lt;/span&gt; &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;openstack-service status&lt;/span&gt; returns:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;MainPID=845 Id=neutron-openvswitch-agent.service ActiveState=active&lt;br /&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;MainPID=812 Id=openstack-ceilometer-compute.service ActiveState=active&lt;/span&gt;&lt;br /&gt;MainPID=822 Id=openstack-nova-compute.service ActiveState=active&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
The compute nodes are running Neutron OVS agent, ceilometer-compute, and nova-compute services.&lt;br /&gt;
&lt;br /&gt;
Once I edit &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;pipeline.yaml&lt;/span&gt; on &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;compute01&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;compute02&lt;/span&gt; and restart ceilometer on each Nova node, my &lt;i&gt;cpu_high&lt;/i&gt; alarm finally gets triggered:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;ceilometer alarm-list&lt;/span&gt;&lt;br /&gt;+--------------------------------------+----------+-------+----------+---------+------------+-------------------------------------+------------------+&lt;br /&gt;| Alarm ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | State | Severity | Enabled | Continuous | &lt;span style=&quot;background-color: yellow;&quot;&gt;Alarm&lt;/span&gt; condition&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Time constraints |&lt;br /&gt;+--------------------------------------+----------+-------+----------+---------+------------+-------------------------------------+------------------+&lt;br /&gt;| 23651a53-19cf-4bb0-97e0-09fab14445cd | cpu_high | alarm | low&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | True&amp;nbsp;&amp;nbsp;&amp;nbsp; | False&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | avg(cpu_util) &amp;gt; 70.0 during 2 x 60s | None&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;+--------------------------------------+----------+-------+----------+---------+------------+-------------------------------------+------------------+&lt;/span&gt;&lt;br /&gt;And you can also see that the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;cpu_util&lt;/span&gt; samples are now taken at one-minute intervals:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;# &lt;span style=&quot;color: blue;&quot;&gt;ceilometer sample-list --meter cpu_util --query \&lt;br /&gt;&amp;nbsp; resource=f3280890-1b60-4a6c-8df5-7195dbb00ca3 -l 10&lt;/span&gt;&lt;br /&gt;+--------------------------------------+----------+-------+---------------+------+----------------------------+&lt;br /&gt;| Resource ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Name&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Type&amp;nbsp; | Volume&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; | Unit | Timestamp&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; |&lt;br /&gt;+--------------------------------------+----------+-------+---------------+------+----------------------------+&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.504582533 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:45:50.867000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.478356119 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:44:50.880000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.424959609 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:43:50.945000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.431860726 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:42:50.872000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.486230975 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:41:50.881000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.458524549 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:40:50.873000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.540472746 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:39:50.878000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.494100804 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:38:50.940000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.499692501 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:37:50.869000 |&lt;br /&gt;| f3280890-1b60-4a6c-8df5-7195dbb00ca3 | cpu_util | gauge | 102.415145802 | %&amp;nbsp;&amp;nbsp;&amp;nbsp; | 2016-09-27T06:36:50.868000 |&lt;br /&gt;+--------------------------------------+----------+-------+---------------+------+----------------------------+&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/2345697180600062249/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/openstack-mitaka-changing-ceilometer.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2345697180600062249'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/2345697180600062249'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/openstack-mitaka-changing-ceilometer.html' title='Openstack Mitaka - Changing ceilometer default polling period in pipeline.yaml'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-8210900040005356256</id><published>2016-09-24T09:58:00.001+09:00</published><updated>2016-09-24T10:11:49.906+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="archlinux"/><category scheme="http://www.blogger.com/atom/ns#" term="fedora"/><category scheme="http://www.blogger.com/atom/ns#" term="LaTeX"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Using Korean UTF8 fonts in LaTeX with koTeX</title><content type='html'>Although I am not an academic, I sometimes use LaTeX to write documents containing mathematical expressions. My resume is also formatted as a &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.tex&lt;/span&gt; document which I then export to PDF using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdflatex&lt;/span&gt;. One inconvenience, however, is that regular LaTeX doesn&#39;t support UTF8 characters.&lt;br /&gt;
&lt;br /&gt;
When I searched the Internet for ways to add Korean fonts to &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;.tex&lt;/span&gt; documents, I first came across the package &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;texlive-langcjk&lt;/span&gt; which can be invoked in your document with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;\usepackage {CJKutf8}&lt;/span&gt; but it fails to correctly render Korean fonts using the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdflatex&lt;/span&gt; rendering engine.&lt;br /&gt;
&lt;br /&gt;
I then tried the koTeX package which can be found in the default Fedora 24 repositories as &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;texlive-kotex-*&lt;/span&gt; and in the default Archlinux repositories as &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;texlive-langkorean&lt;/span&gt;. In your LaTeX preamble simply add&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;\usepackage {kotex}&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
and you will be able to use any UTF8 Korean fonts you have installed on your system. Note that you must use &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;xetex&lt;/span&gt; instead of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdflatex&lt;/span&gt; as your tex to pdf rendering engine, however.&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVWhdmLKoXA4rmCNhgawVePgCVXyMfwMfBGyQ7to8yY0azirrihR_8sNyA3K00xm-V5z2JOIQb0OAgNDKk0VsXEPdcT2MxUCitVgxsaK20HNXOKU9xwYsuqBsFd841jyBJ50sX1KP3Q/s1600/2016-09-24-094232_1366x768_scrot.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;358&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVWhdmLKoXA4rmCNhgawVePgCVXyMfwMfBGyQ7to8yY0azirrihR_8sNyA3K00xm-V5z2JOIQb0OAgNDKk0VsXEPdcT2MxUCitVgxsaK20HNXOKU9xwYsuqBsFd841jyBJ50sX1KP3Q/s640/2016-09-24-094232_1366x768_scrot.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiufSZvdmXfQp-oi-OnWEEhV2-hSuU0Ur5Afn_Yxgm4CmY45kogKVqaWesV4hZZTvcx9Ap-84vw8VxPk5XaDIJmlGCpEADgdgsDL5esKH9cbguenLNJV-O_sS-eVFRxy81Z4QaDPOjYYw/s1600/Gummi_preferences_window.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;584&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiufSZvdmXfQp-oi-OnWEEhV2-hSuU0Ur5Afn_Yxgm4CmY45kogKVqaWesV4hZZTvcx9Ap-84vw8VxPk5XaDIJmlGCpEADgdgsDL5esKH9cbguenLNJV-O_sS-eVFRxy81Z4QaDPOjYYw/s640/Gummi_preferences_window.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
To use &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xetex&lt;/span&gt; on Fedora, you must have the &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-xetex-bin&lt;/span&gt; package installed. On Archlinux, xetex can be found in the package &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-bin&lt;/span&gt;. If you find that you are missing some &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;.sty&lt;/span&gt; font files needed to render your LaTeX document to PDF, you will have to install those separately. For example, on Fedora I had to separately install &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-isodate&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-substr&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-textpos&lt;/span&gt;, and &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;texlive-titlesec&lt;/span&gt; before my resume template could render into PDF using &lt;span style=&quot;font-family: &amp;quot;Courier New&amp;quot;,Courier,monospace;&quot;&gt;xetex&lt;/span&gt;.</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/8210900040005356256/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/using-korean-utf8-fonts-in-latex-with.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8210900040005356256'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/8210900040005356256'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/using-korean-utf8-fonts-in-latex-with.html' title='Using Korean UTF8 fonts in LaTeX with koTeX'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjUVWhdmLKoXA4rmCNhgawVePgCVXyMfwMfBGyQ7to8yY0azirrihR_8sNyA3K00xm-V5z2JOIQb0OAgNDKk0VsXEPdcT2MxUCitVgxsaK20HNXOKU9xwYsuqBsFd841jyBJ50sX1KP3Q/s72-c/2016-09-24-094232_1366x768_scrot.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-817206577595949366</id><published>2016-09-17T09:57:00.000+09:00</published><updated>2016-11-25T18:47:41.545+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><category scheme="http://www.blogger.com/atom/ns#" term="packstack"/><title type='text'>Openstack Mitaka multinode install using Packstack</title><content type='html'>I recently did a four-node install of Openstack Mitaka (RDO 9) using a pre-edited Packstack answer file. Of the four nodes, two are Nova compute nodes, one is a control node (Keystone, Horizon, Nova Controller, Neutron, etc) and one is a storage node (Glance and Cinder).&lt;br /&gt;
&lt;br /&gt;
The external and internal network interfaces are &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;br-ex&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;br-eno2&lt;/span&gt;, respectively. Before running&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;packstack --answer-file [name of answerfile]&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
you must create these interfaces manually in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/sysconfig/network-scripts&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
On my servers, I made eno1 a slave of br-ex and used an Open V-switch bridge instead of the built-in linux bridge. Here is my network config file for eno1 (ifcfg-eno1)&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;NAME=eno1&lt;br /&gt;UUID=a5802af4-1400-4d4f-964c-2eae6e20905f&lt;br /&gt;DEVICE=eno1&lt;br /&gt;DEVICETYPE=ovs&lt;br /&gt;ONBOOT=yes&lt;br /&gt;TYPE=OVSPort&lt;br /&gt;BOOTPROTO=none&lt;br /&gt;OVS_BRIDGE=br-ex&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
And here is my network config file for  br-ex (ifcfg-br-ex):&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;NAME=br-ex&lt;br /&gt;DEVICE=br-ex&lt;br /&gt;DEVICETYPE=ovs&lt;br /&gt;TYPE=OVSBridge&lt;br /&gt;ONBOOT=yes&lt;br /&gt;BOOTPROTO=static&lt;br /&gt;IPADDR=192.168.10.116&lt;br /&gt;NETMASK=255.255.255.0&lt;br /&gt;GATEWAY=192.168.10.1&lt;br /&gt;PEERDNS=yes&lt;br /&gt;DNS1=168.126.63.1&lt;br /&gt;DNS2=168.126.63.2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You will also need to make similar settings for &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;eno2&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;br-eno2&lt;/span&gt;&amp;nbsp; (which will be used for the internal or management network). In my case the external network is on 192.168.10.x, while my internal network is on 192.168.95.x&lt;br /&gt;
&lt;br /&gt;
To apply the new settings, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;systemctl restart network&lt;/span&gt; and also make sure that you stop and disable &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;NetworkManager&lt;/span&gt; before running Packstack.&lt;br /&gt;
&lt;br /&gt;
In the Packstack answer file, I used &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;br-ex&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;br-eno2&lt;/span&gt; in the following four settings:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CONFIG_NEUTRON_L3_EXT_BRIDGE=br-ex&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CONFIG_NEUTRON_OVS_BRIDGE_MAPPINGS=extnet:br-ex,physnet1:br-eno2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CONFIG_NEUTRON_OVS_BRIDGE_IFACES=br-ex:eno1,br-eno2:eno2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;CONFIG_NEUTRON_OVS_BRIDGES_COMPUTE=br-ex,br-eno2&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I also specified that &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;extnet&lt;/span&gt; and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;physnet1&lt;/span&gt; use flat networking instead of vxlan or vlan so that instances can communicate with my existing physical network.&lt;br /&gt;
&lt;br /&gt;
In order to install Glance and Cinder on a node separate from the control node, you must enable unsupported parameters as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# Specify &#39;y&#39; if you want to use unsupported parameters. This should&lt;br /&gt;# be used only if you know what you are doing. Issues caused by using&lt;br /&gt;# unsupported options will not be fixed before the next major release.&lt;br /&gt;# [&#39;y&#39;, &#39;n&#39;]&lt;br /&gt;CONFIG_UNSUPPORTED=y&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
then specify the storage node IP which will host Glance and Cinder:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;# (Unsupported!) Server on which to install OpenStack services&lt;br /&gt;# specific to storage servers such as Image or Block Storage services.&lt;br /&gt;CONFIG_STORAGE_HOST=192.168.95.11&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
It is highly-recommended to define hostnames for each node so that Openstack can refer to nodes without using IP addresses (which can change), but in my test installation I didn&#39;t create specify hostnames and IP&#39;s in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/hosts&lt;/span&gt; for each node. Because I simply use IP addresses as identifiers, after the Packstack install is completed, I have to edit &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;/etc/nova/nova.conf&lt;/span&gt; on both compute nodes and edit the following setting to use IP address instead of hostname:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;vncserver_proxyclient_address=192.168.10.115&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
Note that the IP address must have an IP in the same subnet as the vnc base url in &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;nova.conf&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
You can see my entire Openstack Mitaka Packstack answer file for four-node installation at the following link:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://gist.githubusercontent.com/gojun077/59fbfa56e395853002a65465f91fb691/raw/662fc97ede44d75c02104143909ffe4dda416354/4node-packstack-mitaka.cfg&quot;&gt;https://gist.githubusercontent.com/gojun077/59fbfa56e395853002a65465f91fb691/raw/662fc97ede44d75c02104143909ffe4dda416354/4node-packstack-mitaka.cfg&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/817206577595949366/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/openstack-mitaka-multinode-install.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/817206577595949366'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/817206577595949366'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/openstack-mitaka-multinode-install.html' title='Openstack Mitaka multinode install using Packstack'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-7173671078909206183</id><published>2016-09-10T09:54:00.002+09:00</published><updated>2016-09-10T09:54:40.112+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="kvm"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><category scheme="http://www.blogger.com/atom/ns#" term="openstack"/><title type='text'>Preparing a Win7 VM for use in Openstack Mitaka</title><content type='html'>In the project I am currently working on, the client wants to use a variety of OS instances on top of Openstack. Running recent Linux VM&#39;s (kernel versions 2.6 and above support the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;virtio&lt;/span&gt; drivers used in Openstack) on Nova just works out of the box, but running Windows VM&#39;s on Openstack requires some preparation -- namely, you must first install Redhat&#39;s virtio drivers into a Win7 VM and then import the VM image into Glance.&lt;br /&gt;
&lt;br /&gt;
Since I already have a Win7 VM I use for testing in Virtualbox (downloaded legally from Microsoft at &lt;a href=&quot;https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/&quot;&gt;modernie&lt;/a&gt;), I thought it would be a simple task to just install &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;virtio-win&lt;/span&gt; drivers into my Virtualbox Win7 instance. This idea didn&#39;t pan out, however.&lt;br /&gt;
&lt;br /&gt;
If you follow the Redhat guide for &lt;a href=&quot;https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/6/html/Virtualization_Host_Configuration_and_Guest_Installation_Guide/form-Virtualization_Host_Configuration_and_Guest_Installation_Guide-Para_virtualized_drivers-Mounting_the_image_with_virt_manager.html&quot;&gt;installing virtio drivers into Windows VM&#39;s&lt;/a&gt;, your VM needs to have the following System Devices in Device Manager:&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;PCI standard RAM Controller (for memory balloon driver)&lt;/li&gt;
&lt;li&gt;PCI Simple Communication Controller (for vioserial driver)&lt;/li&gt;
&lt;li&gt;virtio network (for netKVM driver)&lt;/li&gt;
&lt;li&gt;virtio storage (for viostor driver)&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
Virtualbox by default supports &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;virtio-net&lt;/span&gt; network adapter type, but it doesn&#39;t support virtio storage devices, memory ballooning, or vioserial, so these virtio&lt;br /&gt;
&lt;br /&gt;
Here is a screenshot of the available System Devices in a Win7 modernie VM running on Virtualbox:&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGPIVo8lZa46vGO5UgjzJzR3awEHTl7Kw-XrFXenOIGfhuoURp1nm18VUFy1q8xSnJ0vrYgkjiHkjRtTgdO3nkRilYUg-JXHx4HK0WfmlQEE7PM9g6uDBV_c0hJSZTfktobNex1ocglA/s1600/VirtualBox_IE10+-+Win7_08_09_2016_12_37_31.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;480&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGPIVo8lZa46vGO5UgjzJzR3awEHTl7Kw-XrFXenOIGfhuoURp1nm18VUFy1q8xSnJ0vrYgkjiHkjRtTgdO3nkRilYUg-JXHx4HK0WfmlQEE7PM9g6uDBV_c0hJSZTfktobNex1ocglA/s640/VirtualBox_IE10+-+Win7_08_09_2016_12_37_31.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
You will notice that the required devices noted above do not exist.&lt;br /&gt;
&lt;br /&gt;
I therefore had to do things the hard way. First I downloaded a Windows 7 installation iso then I created a new KVM virtual machine using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;virt-manager&lt;/span&gt;. The virtual machine has the following devices:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;2 IDE CD-ROM&#39;s - the first CD-ROM must mount the virtio-win iso file while the second CD-ROM will mount the Windows 7 iso.&lt;/li&gt;
&lt;li&gt;1 VirtIO hard disk&lt;/li&gt;
&lt;li&gt;2 VirtIO network adapters (1 for the private subnet, 1 for the public subnet for floating IP&#39;s in Openstack)&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
As of September 2016, you also have to &lt;a href=&quot;https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/1585008&quot;&gt;change the video type from QXL to Cirrus&lt;/a&gt;, otherwise the VM will get stuck on &quot;Starting Windows&quot;. This is a bug in &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;qemu&lt;/span&gt; and might have been fixed by the time you read this article.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
The Win7 installer will not be able to find any disks (because the disk uses virtio), so when it asks you for the location of the disk, click the install drivers button and select the CD-ROM containing the Redhat virtio drivers for Windows.&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
I followed this guide for these steps:&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;https://www.mirantis.com/openstack-portal/express-openstack-portal/migrating-from-vmware-for-windows-vms/&quot;&gt;https://www.mirantis.com/openstack-portal/express-openstack-portal/migrating-from-vmware-for-windows-vms/&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Although the guide is for VMWare, it works just as well for KVM. However, the last step about adding the virtio drivers to regedit is not necessary for KVM.&lt;/div&gt;
</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/7173671078909206183/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/preparing-win7-vm-for-use-in-openstack.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/7173671078909206183'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/7173671078909206183'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/preparing-win7-vm-for-use-in-openstack.html' title='Preparing a Win7 VM for use in Openstack Mitaka'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiGPIVo8lZa46vGO5UgjzJzR3awEHTl7Kw-XrFXenOIGfhuoURp1nm18VUFy1q8xSnJ0vrYgkjiHkjRtTgdO3nkRilYUg-JXHx4HK0WfmlQEE7PM9g6uDBV_c0hJSZTfktobNex1ocglA/s72-c/VirtualBox_IE10+-+Win7_08_09_2016_12_37_31.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-5086619705275307318</id><published>2016-09-03T09:56:00.002+09:00</published><updated>2016-09-03T12:08:48.978+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>pdfshuffler for adding and removing pages from a PDF file</title><content type='html'>I used to use &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdfmod&lt;/span&gt; for Linux to concatenate multiple PDF files together or to remove pages from a PDF file. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdfmod&lt;/span&gt; has mono libraries (open source MS .NET implementation) as a dependency, however, and they take up over 100 MB on disk when installed.&lt;br /&gt;
&lt;br /&gt;
I have found a nice, lightweight replacement, however. &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;&lt;a href=&quot;https://sourceforge.net/projects/pdfshuffler/&quot;&gt;pdfshuffler&lt;/a&gt;&lt;/span&gt; has just a handful of python dependencies and takes up less than 5 MB on disk. It has all the functionality of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;pdfmod&lt;/span&gt; but is much lighter. It can be found in the default repos on Fedora 24 and in the &lt;a href=&quot;https://aur.archlinux.org/packages/pdfshuffler-git/&quot;&gt;Arch User Repository&lt;/a&gt;. Highly recommended!&lt;br /&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHv7PdMPrcvplBzf-SA-o75-ciqg6cj3O6XfIYDT_CQ3U7rGvH_i6ACLJYz2XrygzPgGQS25CPDRt1Sfcw6jPj1cnnEvp74-GCRkdwHUyIj1Yk6elVi5chSDmWrjCifaD7xsQkvLWYcA/s1600/pdfshuffler.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;179&quot; src=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHv7PdMPrcvplBzf-SA-o75-ciqg6cj3O6XfIYDT_CQ3U7rGvH_i6ACLJYz2XrygzPgGQS25CPDRt1Sfcw6jPj1cnnEvp74-GCRkdwHUyIj1Yk6elVi5chSDmWrjCifaD7xsQkvLWYcA/s320/pdfshuffler.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Note that you may run into a python bug when running pdfshuffler; you simply need to change ~2 lines of Python source as a workaround:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;https://sourceforge.net/p/pdfshuffler/bugs/39/?limit=25#30ad/6f47&quot;&gt;https://sourceforge.net/p/pdfshuffler/bugs/39/?limit=25#30ad/6f47&lt;/a&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/5086619705275307318/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/pdfshuffler-for-adding-and-removing.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/5086619705275307318'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/5086619705275307318'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/09/pdfshuffler-for-adding-and-removing.html' title='pdfshuffler for adding and removing pages from a PDF file'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgHv7PdMPrcvplBzf-SA-o75-ciqg6cj3O6XfIYDT_CQ3U7rGvH_i6ACLJYz2XrygzPgGQS25CPDRt1Sfcw6jPj1cnnEvp74-GCRkdwHUyIj1Yk6elVi5chSDmWrjCifaD7xsQkvLWYcA/s72-c/pdfshuffler.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-4756459623736846700</id><published>2016-08-27T09:55:00.002+09:00</published><updated>2016-08-27T09:55:18.051+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Finding PID for programs - Why &#39;pidof foo&#39; is less trustworthy than &#39;ps -eF | grep foo&#39;</title><content type='html'>I often use &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;pidof&lt;/span&gt; to find the PID of a running program. It works well with dhclient, dnsmasq and other executable binaries. But &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;pidof&lt;/span&gt; runs into problems when trying to find the PID of script files that in turn invoke other programs. Take, for example, the Python 2 program &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;deluge-gtk&lt;/span&gt; BitTorrent client.&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[archjun@pinkS310 bin]$ &lt;span style=&quot;color: blue;&quot;&gt;pidof deluge-gtk&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[archjun@pinkS310 bin]$ &lt;span style=&quot;color: blue;&quot;&gt;ps -eF | grep &quot;deluge*&quot; | grep -v grep&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;archjun &amp;nbsp;&lt;span style=&quot;background-color: yellow;&quot;&gt;25862&lt;/span&gt; &amp;nbsp; &amp;nbsp; 1 &amp;nbsp;3 289160 89272 &amp;nbsp;1 16:47 ? &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;00:01:30 /usr/bin/python2 /usr/bin/deluge-gtk /MULTIMEDIA/Torrents/CentOS-5.5-x86_64-bin-DVD.torrent&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
In the first case, &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;pidof&lt;/span&gt; fails to return any PID for the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;deluge-gtk&lt;/span&gt; executable file. In the second case, grepping for &lt;i&gt;deluge-gtk&lt;/i&gt; in the output of &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ps -eF&lt;/span&gt; (all processes, extra full format) correctly returns the PID of the BitTorrent client which is executed by Python 2.&lt;br /&gt;
&lt;br /&gt;
Let&#39;s take a look at the contents of the &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;deluge-gtk&lt;/span&gt; executable file:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;[archjun@pinkS310 bin]$ &lt;span style=&quot;color: blue;&quot;&gt;cat /usr/bin/deluge-gtk&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;#!/usr/bin/python2&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;# EASY-INSTALL-ENTRY-SCRIPT: &#39;deluge==1.3.13.dev0&#39;,&#39;gui_scripts&#39;,&#39;deluge-gtk&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;__requires__ = &#39;deluge==1.3.13.dev0&#39;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;import sys&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;from pkg_resources import load_entry_point&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&lt;br /&gt;&lt;/span&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;if __name__ == &#39;__main__&#39;:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; sys.exit(&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; load_entry_point(&#39;deluge==1.3.13.dev0&#39;, &#39;gui_scripts&#39;, &#39;deluge-gtk&#39;)()&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;&amp;nbsp; &amp;nbsp; )&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;ps -eF&lt;/span&gt; is more useful because it can follow an execution chain to the final PID.&lt;/div&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/4756459623736846700/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/08/finding-pid-for-programs-why-pidof-foo.html#comment-form' title='0개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4756459623736846700'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/4756459623736846700'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/08/finding-pid-for-programs-why-pidof-foo.html' title='Finding PID for programs - Why &#39;pidof foo&#39; is less trustworthy than &#39;ps -eF | grep foo&#39;'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-6855909399292968376.post-3386899262715168540</id><published>2016-08-20T09:54:00.001+09:00</published><updated>2016-11-25T18:26:42.699+09:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="bash"/><category scheme="http://www.blogger.com/atom/ns#" term="code"/><category scheme="http://www.blogger.com/atom/ns#" term="linux"/><title type='text'>Web scraping using lynx and shell utilities</title><content type='html'>In 2016, many people would probably think of using Python modules such as &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;BeautifulSoup&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;urllib&lt;/span&gt;, or &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;requests&lt;/span&gt; for scraping and parsing web pages. While this is a good choice, in some cases it can be quicker to scrape web pages using the text browser &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;lynx&lt;/span&gt; and parsing the results using &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;grep&lt;/span&gt;, &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;awk&lt;/span&gt;, and &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sed&lt;/span&gt;.&lt;br /&gt;
&lt;br /&gt;
My use case is as follows: I want to programatically generate a list of rpm packages from Fedora&#39;s EPEL X (5, 6, 7), CentOS vault, CentOS mirror, and HP DL server firmware sites. I want this list to be comparable to the output of &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;rpm -qa&lt;/span&gt; on RHEL machines. Here are some sample URL&#39;s for sites showing rpm package lists:&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://vault.centos.org/5.7/updates/x86_64/RPMS/&quot;&gt;http://vault.centos.org/5.7/updates/x86_64/RPMS/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mirror.centos.org/centos-5/5.11/os/x86_64/CentOS/&quot;&gt;http://mirror.centos.org/centos-5/5.11/os/x86_64/CentOS/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;https://dl.fedoraproject.org/pub/epel/6/x86_64/&quot;&gt;https://dl.fedoraproject.org/pub/epel/6/x86_64/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://mirror.centos.org/centos-7/7.2.1511/updates/x86_64/Packages/&quot;&gt;http://mirror.centos.org/centos-7/7.2.1511/updates/x86_64/Packages/&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/2016.04.0_supspp_rhel6.8_x86_64/&quot;&gt;http://downloads.linux.hpe.com/repo/spp/rhel/6/x86_64/2016.04.0_supspp_rhel6.8_x86_64/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
If you visit any of these links you will find that the basic format is the same -- from the left, the first field is an icon, the second field is the rpm filename, the third field is the date in YYYY-MM-DD, the fourth field is time in HH:MM, and the fifth field is file size.&lt;br /&gt;
&lt;br /&gt;
Here is my bash script which parses file list html pages into a simple text file:&lt;br /&gt;
&lt;br /&gt;
&lt;script src=&quot;https://gist.github.com/gojun077/b3be8c56c9706522ffb338dea5de9bfe.js&quot;&gt;&lt;/script&gt;

&lt;br /&gt;
You can see that lynx renders the page from HTML into regular text and dumps this output to a file if you pass the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-dump&lt;/span&gt; option. But this is not enough, because lynx by default inserts a newline character in lines greater than 79 characters. To avoid this problem, you must manually set the line width to something larger. The maximum width in lynx is 990 characters, so I specified this value through the option &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-width=990&lt;/span&gt;. Finally the &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;-nolist&lt;/span&gt; option removes the list of links that lynx inserts at the bottom of the page.&lt;br /&gt;
&lt;br /&gt;
Using grep I then extract just the lines containing the string &quot;&lt;span style=&quot;font-family: inherit;&quot;&gt;.rpm&quot;&lt;/span&gt;. Next I replace all tabs with 4 spaces using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sed&lt;/span&gt; and then use &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;awk&lt;/span&gt; to print just the filename field. Finally I use &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sed&lt;/span&gt; to remove the &quot;.rpm&quot; extension from the filenames to make the output identical to the format of &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;rpm -qa&lt;/span&gt;. Note that the last &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sed&lt;/span&gt; statement might not render correctly in your browser because I use mathjax on my blog. Unfortunately, the characters I am trying to express are also the tags for a mathjax expression; The sed snippet should appear as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;sed &quot;s:\&lt;i&gt;openparens&lt;/i&gt;\.rpm\&lt;i&gt;closeparens&lt;/i&gt;::g&quot; &quot;${F3}&quot; &amp;gt; &quot;$2&quot;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
I have replaced &#39;(&#39; and &#39;)&#39; with openparens and closeparens, respectively due to my blog&#39;s mathjax plugin incorrectly interpreting the above expression as a mathjax statement.&lt;br /&gt;
&lt;br /&gt;
If you don&#39;t escape &quot;.rpm&quot; with backslashes, &#39;.&#39; will be interpreted as a regex &quot;match any character&quot; which would match strings like &quot;-rpm&quot;, &quot;.rpm&quot;, &quot;redhat-rpm-config&quot;, etc. This is undesirable.&lt;br /&gt;
&lt;br /&gt;
BTW this script is for informational and educational purposes only. It would actually be easier to just invoke lynx with&amp;nbsp;&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;lynx -dump -listonly&lt;/span&gt;&amp;nbsp;... and skip the data munging steps of replacing tabs with spaces using &lt;span style=&quot;font-family: Courier New, Courier, monospace;&quot;&gt;sed&lt;/span&gt;. If you do it this way you will get just the links to rpm files from EPEL, CentOS mirror, etc. Then you can return just the filename from each link&#39;s path with &lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;awk&lt;/span&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: &amp;quot;courier new&amp;quot; , &amp;quot;courier&amp;quot; , monospace;&quot;&gt;awk -F&#39;/&#39; &#39;{ print $NF }&#39;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://eatpeppershothot.blogspot.com/feeds/3386899262715168540/comments/default' title='댓글'/><link rel='replies' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/08/web-scraping-using-lynx-and-shell.html#comment-form' title='1개의 덧글'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/3386899262715168540'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/6855909399292968376/posts/default/3386899262715168540'/><link rel='alternate' type='text/html' href='http://eatpeppershothot.blogspot.com/2016/08/web-scraping-using-lynx-and-shell.html' title='Web scraping using lynx and shell utilities'/><author><name>jun</name><uri>http://www.blogger.com/profile/08518250216211753686</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry></feed>