Config drive: delete deprecated config var config_drive_tempdir

Commit 6e15d787fffcef8c4299fbaf1d5c715af1a34fa2 removed the use
of this configuration variable.

Change-Id: Ifd5baa8b7d579b0959cdb57b1335380a4129d652
Revert "Truncate encoded instance message to 255"

This reverts commit bd9c32289ff8cf1bc67c1395ad921c703aa4c489.

UTF-8 character bytes size varies from 1 to 6. If truncating a long
bytes string to 255, the last character may be cut in the middle,
so that UnicodeDecodeError will occur when converting it back to
unicode. Need to revert this code change and make a new patch.

Related-Bug: 1389102

Change-Id: Ie439cffe11d657e77397c9070a3923a61f68a678
Truncate encoded instance message to 255 or fewer

In nova/compute/utils.py function exception_to_dict truncates unicode
message to 255. However, in non-English locales, instance message may
be longer than 255 after encoding the unicode message to byte message.
Need to truncate the encoded byte message to 255 or fewer, in order to
ensure db insert operation succeed.

Change-Id: I62fa2830b22e367eb9486d09d3c8818a18ebd20d
Closes-Bug: 1389102
Decrease admin context usage in _get_guest_config

commit 594b18a3 change the context for _get_guest_config
usage to either context given or admin context if it's not
specified. However, it has side effect on later functions
which use the context, so the scope of change the
context should be decreased and this patch fixed that bug.

Change-Id: I7bd96e2c3ee691bae51ac055f57650c14d4e10b4
Replacement `_` on `_LI` in all LOG.info - part 2

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: Iaebb239ef20a0da3df1e3552baf26f412d0fcdc0
Replacement `_` on `_LE` in all LOG.exception

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating.  For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Added a hacking rule for the log exception about checking
translation for it.

Change-Id: If80ea6f177bb65afcdffce71550bb38fedcc54eb
Replacement `_` on `_LW` in all LOG.warning part 1

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Added a hacking rule for the warning about checking
translation for it and checking logging level `warning` instead
alias `warn`.

Change-Id: I2bced49dc5a0408a94d5d20d85b20c682886edbe
Replacement `_` on `_LW` in all LOG.warning part 2

oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack

There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages

Change-Id: I5ab13610d3e10a68ae49f9fd7fac151aa66ea98d
Merge "Replacement `_` on `_LI` in all LOG.info - part 2"
Merge "Replacement `_` on `_LE` in all LOG.exception"
Merge "Replacement `_` on `_LW` in all LOG.warning part 1"
Merge "Replacement `_` on `_LW` in all LOG.warning part 2"
Merge "Decrease admin context usage in _get_guest_config"
Merge "Config drive: delete deprecated config var config_drive_tempdir"
Merge "Revert "Truncate encoded instance message to 255""
Merge "Truncate encoded instance message to 255 or fewer"