Install the Identity Service in OpenStack Installation Guide for Ubuntu 12.04/14.04 (LTS)  - icehouse

Bug #1311298 reported by Guilherme Steinmuller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
openstack-manuals
Invalid
Low
Unassigned

Bug Description

Hi! The following command has a syntax error

$ sudo (crontab -l 2>&1 | grep -q token_flush) || \
echo '@hourly /usr/bin/keystone-manage token_flush >/var/log/keystone/keystone-tokenflush.log 2>&1' >> /var/spool/cron/crontabs/root

-bash: syntax error near unexpected token `crontab'

Anyone?

-----------------------------------
Built: 2014-04-22T07:19:01 00:00
git SHA: 680233b8f8b813af24265ccdd8cd90a74833f8b8
URL: http://docs.openstack.org/trunk/install-guide/install/apt/content/keystone-install.html
source File: file:/home/jenkins/workspace/openstack-manuals-tox-doc-publishdocs/doc/install-guide/section_keystone-install.xml
xml:id: keystone-install

Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

Using sudo will not work in this case, the easiest solution is probably to become root (sudo -s or sudo -i) and then run the command.

Changed in openstack-manuals:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

Note for the doc team: I think we should revert to using 'crontab -e'. It works everywhere, and with sudo too.

Revision history for this message
Guilherme Steinmuller (guilherme-pimentel) wrote :

Thank you! It works!

Revision history for this message
Alexandra Settle (alexandra-settle) wrote :

Are you suggesting the code should now read:

$ sudo (crontab -e 2>&1 | grep -q token_flush) || \
echo '@hourly /usr/bin/keystone-manage token_flush >/var/log/keystone/keystone-tokenflush.log 2>&1' >> /var/spool/cron/crontabs/root

Changed in openstack-manuals:
assignee: nobody → Alexandra Settle (alexandra-settle)
Revision history for this message
Alexandra Settle (alexandra-settle) wrote :

Sorry, should the code now read:

# cronjob -e

/usr/bin/keystone-manage token_flush >/var/log/keystone/keystone-tokenflush.log * * * 1 * *

Revision history for this message
Alexandra Settle (alexandra-settle) wrote :

Also, do you want this changed in all the releases? OR just Icehouse and Juno?

Revision history for this message
Gauvain Pocentek (gpocentek) wrote :

I think that calling 'crontab -e' and specifying what to add in the editor would be much simpler. BUT that's what we had in the first version, and it's been updated to what it is now (several times). It coul be a good idea to mail the list to make sure that we want this change (I know I do :)

BTW the line would be:

@hourly /usr/bin/keystone-manage token_flush >/var/log/keystone/keystone-tokenflush.log 2>&1

Changed in openstack-manuals:
assignee: Alexandra Settle (alexandra-settle) → nobody
Revision history for this message
Matt Kassawara (ionosphere80) wrote :

Installation guide no longer uses SQL backend for tokens.

Changed in openstack-manuals:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.