Closed Bug 1062466 Opened 10 years ago Closed 10 years ago

Short link wasn't added to a new article

Categories

(support.mozilla.org :: Knowledge Base Software, task, P3)

Tracking

(Not tracked)

VERIFIED FIXED
2014Q3

People

(Reporter: jsavage, Assigned: rrosario)

References

Details

(Whiteboard: u=user c=wiki p=1 s=2014.18)

A new article (created on August 20) is still missing a shortlink: https://support.mozilla.org/en-US/kb/how-run-firefox-when-profile-missing-inaccessible
I've seen error mail related to this task. Something about trying to write to the read-only database. I think the task might need `from multidb.pinning import pin_this_thread` to force it to use the master database and not the slaves.
we might have time this sprint.
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: u=user c=wiki p=1 s=2014.16
Target Milestone: --- → 2014Q3
traceback:

Task kitsune.wiki.tasks.add_short_links with id 3a37d52d-4990-4616-a7ba-256ede77a902 raised exception:
"OperationalError(1290, 'The MySQL server is running with the --read-only option so it cannot execute this statement')"


Task was called with args: ([14030L],) kwargs: {}.

The contents of the full traceback was:

Traceback (most recent call last):
  File "/data/www/support.mozilla.com/kitsune/vendor/src/celery/celery/task/trace.py", line 233, in trace_task
    R = retval = fun(*args, **kwargs)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/celery/celery/task/trace.py", line 420, in __protected_call__
    return self.run(*args, **kwargs)
  File "/data/www/support.mozilla.org/kitsune/kitsune/sumo/decorators.py", line 109, in _timeit
    result = f(*args, **kwargs)
  File "/data/www/support.mozilla.org/kitsune/kitsune/wiki/tasks.py", line 167, in add_short_links
    doc.save()
  File "/data/www/support.mozilla.org/kitsune/kitsune/wiki/models.py", line 254, in save
    self._ensure_inherited_attr('is_archived')
  File "/data/www/support.mozilla.org/kitsune/kitsune/wiki/models.py", line 203, in _ensure_inherited_attr
    self.translations.all().update(**{attr: getattr(self, attr)})
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/query.py", line 493, in update
    rows = query.get_compiler(self.db).execute_sql(None)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/compiler.py", line 980, in execute_sql
    cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/models/sql/compiler.py", line 786, in execute_sql
    cursor.execute(sql, params)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/utils.py", line 99, in __exit__
    six.reraise(dj_exc_type, dj_exc_value, traceback)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/backends/util.py", line 53, in execute
    return self.cursor.execute(sql, params)
  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/db/backends/mysql/base.py", line 124, in execute
    return self.cursor.execute(query, args)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
    self.errorhandler(self, exc, value)
  File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
    raise errorclass, errorvalue
OperationalError: (1290, 'The MySQL server is running with the --read-only option so it cannot execute this statement')
Assignee: nobody → rrosario
Priority: -- → P3
Deployed to prod. Hoping that fixes it.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
See Also: → 766394
(In reply to Ricky Rosario [:rrosario, :r1cky] from comment #6)
> Deployed to prod. Hoping that fixes it.

Should this have been fixed by now?

The short link is still missing from this article:
https://support.mozilla.org/en-US/kb/how-run-firefox-when-profile-missing-inaccessible 

It's also still missing from another article, recently moved from the "Administration" to the "How to" category:
https://support.mozilla.org/en-US/kb/how-do-tiles-work-firefox

Related discussion:
https://support.mozilla.org/en-US/forums/knowledge-base-articles/710484 [Attn: Admin] "Share this article" links are now (?) automatically added to KB articles
> (In reply to Ricky Rosario [:rrosario, :r1cky] from comment #6)
> > Deployed to prod. Hoping that fixes it.
> 
> Should this have been fixed by now?
> 
> The short link is still missing from this article:
> https://support.mozilla.org/en-US/kb/how-run-firefox-when-profile-missing-inaccessible 
> 
> It's also still missing from another article, recently moved from the
> "Administration" to the "How to" category:
> https://support.mozilla.org/en-US/kb/how-do-tiles-work-firefox
> 
> Related discussion:
> https://support.mozilla.org/en-US/forums/knowledge-base-articles/710484
> [Attn: Admin] "Share this article" links are now (?) automatically added to
> KB articles

Reopened
Status: RESOLVED → REOPENED
Flags: needinfo?(rrosario)
Resolution: FIXED → ---
My patch fixed the traceback we were getting. But there still seems to be some kind of logic bug. Bringing in to the current sprint to loop further.
Flags: needinfo?(rrosario)
Whiteboard: u=user c=wiki p=1 s=2014.16 → u=user c=wiki p=1 s=2014.17
I haven't had a chance to look at this further yet. Moving to next sprint.
Whiteboard: u=user c=wiki p=1 s=2014.17 → u=user c=wiki p=1 s=2014.18
I have a recent database dump and there are 3128 documents that should have a share_link and they don't. The only thing that we are catching is the BitlyRateLimitException. I'm going to add a statsd call to see if that's what we are hitting.
I landed a patch on master that prints out info from the cron job and adds calls to statsd. This will hopefully help figure out what's going on:
https://github.com/mozilla/kitsune/commit/ccbe169c9f36797980a501c605b7fe250e15709b
Ricky, please see my September 20, 2014  post in the related discussion thread,
https://support.mozilla.org/forums/knowledge-base-articles/710484#post-62021 
... and  Joni's September 22, 2014 reply (if you haven't seen it already).
Another problem was the cronjob wasn't set up correctly:

20 */6 * * {{ cron }} generate_missing_share_links

That's missing one *. Should be:

20 */6 * * * {{ cron }} generate_missing_share_links

Fixing now.
ok this is fixed now. Some articles might be cached for a little.
Status: REOPENED → RESOLVED
Closed: 10 years ago10 years ago
Resolution: --- → FIXED
I've seen the cron jobs process the documents. Yay!
Status: RESOLVED → VERIFIED
Blocks: 1304712
See Also: → 1467353
You need to log in before you can comment on or make changes to this bug.