Support for ARM architecture

Bug #317285 reported by Sidnei da Silva
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Client
Fix Released
Medium
Sidnei da Silva
Landscape Server
Fix Released
Medium
Sidnei da Silva
landscape-client (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by Sidnei da Silva

Bug Description

There's no Message Factory registered for ARM processors. NCommander kindly provided a patch, attached.

Revision history for this message
Sidnei da Silva (sidnei) wrote :
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Here's the /proc/cpuinfo from my Nokia N810.

Sidnei da Silva (sidnei)
Changed in landscape:
importance: Undecided → Wishlist
Changed in landscape-client:
importance: Undecided → Wishlist
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

Please don't forget to set a milestone when opening tickets.

Changed in landscape:
milestone: none → mountainview
Revision history for this message
Sidnei da Silva (sidnei) wrote :

I got a mix of Mer and Jaunty running on my N810, I can now look at this.

Changed in landscape:
assignee: nobody → sidnei
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Affects armel port.

Changed in landscape-client (Ubuntu):
status: New → Confirmed
Sidnei da Silva (sidnei)
tags: added: review
Changed in landscape:
importance: Wishlist → Medium
status: New → In Progress
Revision history for this message
Jamu Kakar (jkakar) wrote :

[1]

+ try:
+ current = None
+
+ for line in file:
+ parts = line.split(":", 1)
+ key = parts[0].strip()
+
+ if key == "Processor":
+ # ARM doesn't support SMP, thus no processor-id in
+ # the cpuinfo
+ current = {"processor-id": 0,
+ "model": parts[1].strip()}
+ processors.append(current)
+ elif key == "Cache size":
+ value_parts = parts[1].split()
+ current["cache-size"] = int(value_parts[0].strip())
+ finally:
+ file.close()

I think current should be initially set to {}. If the ordering of
keys in /proc/cpuinfo ever results in 'Cache size' coming before
'Processor', this code will break. current can be appended to the
processors list can happen just after the for loop if bool(current)
is True.

+1 considering #1.

Revision history for this message
Duncan McGreggor (oubiwann) wrote :

[1] The contents of this string (landscape/monitor/tests/test_processorinfo.py) have tabs and a trailing whitespace:

 + ARMv7 = """

Not sure if it's important to preserve that or not...

This is not really a review comment, but qemu supports ARM (as well as PPC and Sparc), and it would be nice to set up Ubuntu images (and a means of installing these images) for optional thorough testing purposes, given the lack of buildbot (and slaves). It'd be sweet to run 4 qemu/kvm clients (for the 4 supported architectures) against a landscape server and take them through their paces...

[2] This is totally a personal preference sort of thing, but if it were me, I probably would have used a regex with groups for (word) white-space:white-space(data)optional-white-space, thus safe-guarding against possible data-mangling if a colon were to ever appear in the data, I also like referencing from matches groups more than list data (e.g., parts[1]).

[3] When you implement Jamu's suggestion, be sure to add a test (that would fail for the current implementation).

+1 with Jamu's comments addressed (mine are optional)

tags: removed: review
Revision history for this message
Sidnei da Silva (sidnei) wrote :

Merged arm-message-factory [r=jkakar,oubiwann] [f=317285].

Register an ARMMessageFactory, such that ARM-based processors are
correctly identified, and that landscape-client doesn't fail on
startup when running on an ARM-based system. Thanks to NCommander for
initial patch.

Changed in landscape:
status: In Progress → Fix Committed
Changed in landscape-client:
assignee: nobody → sidnei
importance: Wishlist → Medium
status: New → Fix Committed
Changed in landscape-client (Ubuntu):
status: Confirmed → Fix Released
Changed in landscape:
status: Fix Committed → Fix Released
Changed in landscape-client:
status: Fix Committed → Fix Released
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.