Bug 1044809

Summary: csprocessor can't authenticate to zanata for new Zanata user
Product: [Community] PressGang CCMS Reporter: Summer Long <slong>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.3CC: lnewson, mcaspers
Target Milestone: ---   
Target Release: 1.5   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-05-01 21:39:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Summer Long 2013-12-19 03:46:38 UTC
Description of problem:
Having followed the setup for a zanata push from here:
http://docbuilder.usersys.redhat.com/13968/#Push_English_Strings_to_Zanata

Received the following error:
java.lang.RuntimeException: Incorrect username/password
	at org.zanata.rest.client.ZanataProxyFactory.<init>(ZanataProxyFactory.java:76)
	at org.jboss.pressgang.ccms.zanata.ZanataProxyFactory.<init>(ZanataProxyFactory.java:29)
	at org.jboss.pressgang.ccms.zanata.ZanataInterface.<init>(ZanataInterface.java:133)
	at org.jboss.pressgang.ccms.zanata.ZanataInterface.<init>(ZanataInterface.java:58)
	at org.jboss.pressgang.ccms.contentspec.client.commands.PushTranslationCommand.pushToZanata(PushTranslationCommand.java:323)
	at org.jboss.pressgang.ccms.contentspec.client.commands.PushTranslationCommand.process(PushTranslationCommand.java:286)
	at org.jboss.pressgang.ccms.contentspec.client.Client.processArgs(Client.java:255)
	at org.jboss.pressgang.ccms.contentspec.client.Client.main(Client.java:109)

Regenerated the key, so then the above error left, but the next run resulted in:
   You are about to push 249 topics to zanata. Continue? (Yes/No)
   yes
   Starting to push topics to zanata...
   Output:
   Warnings:
   Errors:
	Content Spec ID 22537, Revision 571238 failed to be created in Zanata.
   ERROR: Pushing topics to zanata failed.

Version-Release number of selected component (if applicable):
cspclient.noarch                            1.3.1-1

How reproducible:
Run the following command as a new Zanata user:
csprocessor push-translation <ID>

Actual results:
See above errors

Expected results:
Should actually push into Zanata

Additional info:

Comment 1 Lee Newson 2013-12-20 04:02:29 UTC
I had a quick look into the Zanata code today and it looks like you need "import-template" permissions to be able to upload content. How you actually get that permission is beyond me so I'll have to ask the Zanata Devs for some more information.

I'll also take a look at expanding the failure message to include the forbidden information so that users can see they don't have adequate permission.

Comment 2 Lee Newson 2014-03-09 00:42:55 UTC
Fixed in 1.5-SNAPSHOT build 201403071428

The reason Summer wasn't able to push after talking to the Zanata team is that she needs to be a "Project Maintainer" to be able to push source docs. This will need to be manually configured by a RT Ticket (or something similar).

As for the second part of this bug, I've added the following error message for when users don't have adequate permissions:

Topic ID {}, Revision {} failed to be created in Zanata due to having incorrect privileges.

Comment 3 Summer Long 2014-03-09 23:21:36 UTC
And, in the RT ticket (and for what queue?), do you have to ask to be a Project Maintainer for all product docs (for example, OpenStack), or for a particular component (for example, the Install Guide)?